Cut, copy and paste of items in a Zeo Setup with Varnish and Apache

Could it be, that the "cut", "copy" and "paste" options in the folder_contents view are lost if the loadbalancer (in my case via varnish setup) send my editors to another rendering client? is this functionallity pinned to specific client (via session or whatever?)

i can press the "cut" or "copy" button but when i navigate to another folder the "paste" button is not clickable...

perhaps it's a missconfiguration of the cookie handling in varnish.

Plone uses the _cp cookie to identify the copy/paste content, and the cookie has a domain and a path. You've to check if the cookie domain/path are correctly view by Plone/Zope. In Varnish usually there's this rule that keep that cookie in the request, removing other useless cookies:

    if (req.http.Cookie) {
        set req.http.Cookie = ";" + req.http.Cookie;
        set req.http.Cookie = regsuball(req.http.Cookie, "; +", ";");
        set req.http.Cookie = regsuball(req.http.Cookie, ";(statusmessages|__ac|_ZopeId|__cp|auth_token)=", "; \1=");
        set req.http.Cookie = regsuball(req.http.Cookie, ";[^ ][^;]*", "");
        set req.http.Cookie = regsuball(req.http.Cookie, "^[; ]+|[; ]+$", "");
        if (req.http.Cookie == "") {
            unset req.http.Cookie;
        }

But usually you do a rule before to go directly to backend when authenticated (that is the only case when you've the __cp cookie set):

    /* cookies for pass */
    set req.http.UrlNoQs = regsub(req.url, "\?.*$", "");
    if (req.http.Cookie && req.http.Cookie ~ "statusmessages|auth_token|__ac(|_(name|password|persistent))=") {
        if (req.url !~ "/\+\+resource\+\+zmi/" && req.http.UrlNoQs ~ "\.(js|css|kss)$") {
            unset req.http.cookie;
            return(pipe);
        }
        return(pass);
    }

you can implement both and check if the cookie domain/path are correctly recognized by the Zope clients.

Note: this rules are created using plone.recipe.varnish.

We add a cookie to pin to a backend and also skip varnish for logged in users.

sub vcl_recv {

(...)

# bypass the cache when a request method is not GET or HEAD or has an auth header
if ((req.method != "GET" && req.method != "HEAD") || req.http.Authorization) {
    return (pass);
}

cookie.parse(req.http.Cookie);
# do not cache if Plone logged in cookie is set
if (cookie.get("__ac")) {
    return(pass);
}

if (cookie.get("ZEO_BACKEND")) {
    set req.http.X-ZEO-BACKEND = cookie.get("ZEO_BACKEND");
    set req.http.Cookie = regsuball(req.http.Cookie, "ZEO_BACKEND=[^;]+(; )?", "");
} else {
    # The cookies will have floats in them.
    # Whatever, ehh, floats your boat can be used.
    set req.http.X-ZEO-BACKEND = "hint-" + std.random(1, 100);
}
set req.backend_hint = cdir.backend(req.http.X-ZEO-BACKEND);

(...)

}

YMMV