(I've temporarily postponed this. Having ripped my site apart to try and fix it and uninstalled and re-installed the module, it now appears the first time I log in. Although it still doesn't appear for first browser open of anonymous users. Rebuilding the site at the moment, I'll put together a collection of the various issues.)

This has been driving me insane. I can only get the Authcache debug to work in weirdly specific cases.

When it works:

When I'm admin. (Either on HTTPS or HTTP)
When I go to the account page over HTTPS.
When I log in as a user then logout.

I've turned off anything I can think would affect it:

LEMP Stack Ubuntu 12.04
Drupal 7.24
Authcache 7.x-2.0-beta1 : Built in backend cache
Memcache 7.x-1.0

Disabled:
All caching (I just have debug enabled for all roles)
All aggregation and compression
I've also repeatedly cleared all browser records with CCleaner.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

splitsplitsplit’s picture

Issue summary: View changes
Status: Active » Postponed
znerol’s picture

Status: Postponed » Needs review
FileSize
2.53 KB

Thanks for the report.

Although it still doesn't appear for first browser open of anonymous users.

.

I'm also observing this and I think I know the cause: Authcache debug sets the cookie aucdbg to a random value for all users having permission to access the debug widget. The widget code (JavaScript) checks for the presence of this cookie and only attaches itself if it is there.

The problem is that when an anonymous first time visitor hits a page served from the cache, the cookie will not be set and the JavaScript part thinks that the debug widget is disabled.

In order to solve this is issue, the JavaScript part needs to "know" whether authcache debug is enabled for anonymous users. See attached patch.

splitsplitsplit’s picture

Ok applied and I have one of two things which happens:

1. It doesn't appear straight off then it works once you've refreshed the browser once or changed pages once. (Only on private browser, which would make sense with my guess below.)
2. The first page it loads with debug info loading, the rest it loads fine.

I would guess this is because it checks for the cookie before it's been attached the first time the code runs. Then on future loads the cookie is there so this isn't an issue. But I can't seem to re-create any of these issues as consistently as I would like.

I have a possible issue with Varnish though so I've reported that.

znerol’s picture

Title: Authcache Debug not working » Authcache Debug not working for anonymous users
znerol’s picture

Status: Needs review » Fixed

Committed and pushed 9aec77c.

I guess that due to #2157165: Varnish backend, Authenticate cache works, Anonymous doesn't (debug report) being resolved, I can close this one too. Please reopen it if there are still issues with Authcache Debug not working the first time for anonymous users.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.