Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Hi,
I am currently activating Authcache on my site and yes, my site runs much faster now, thats really a great module!
Unfortunately I am facing a problem: After activating Authcache Ajax in a couple of user-specific Views (Views with Block Display), some cache well and some of them just disappear.
I searched through the issues but did not find a solution yet. Also in the debug window no errors occur. Can you tell what can be the reason that some views return empty Ajax results?
I am using Drupal 7.26
Thank you!
Comments
Comment #1
weddigen CreditAttribution: weddigen commented.. anybody who can help?
Still no solution, and I cannot identify why some Views disappear and some Views not.
This is how I configured the Views Authcache settings:
--------
Cache Lifetime: 5 Minutes (Different values have no impact)
Cache per User
Client: Ajax
Fallback: Cancel Caching
--------
With these settings a lot of Views work just fine, but as said some Views disappear.
Comment #2
znerol CreditAttribution: znerol commentedSorry for the delay.
When a view returns empty, do you see a different HTTP status code than 200? You can examine HTTP responses with the developer tools built into your browser.
Also take a look at the recent log entries, and check whether there are PHP errors or messages caused by Authcache.
Further on the "Personalization"-tab in the authcache settings, click on the "Frontcontroller"-pill. Check that the report lists all entries with "Routes exist" = YES. At the bottom of the page use the button "Rebuild routes" if necessary.
If this does not help, please try to find a pattern of which views work and compare them to those which do not. Some things you should consider:
Comment #3
weddigen CreditAttribution: weddigen commentedHi,
I checked all the points but everything seems to be fine
- all elements return HTTP 200 OK (used Chrome Tools)
- no errros in error.log and php-error.log
- Routes Exists states YES for all
Regarding a pattern for the disappearing views: there is hardly none, the only idea I have is that fields of commerce products and/or orders are referenced in the disappearing views (drupalcommerce). But other authcached views with commerce products work fine.
Comment #4
znerol CreditAttribution: znerol commentedIn this case there might be issues with the authcache settings for certain views. Regrettably I do not have documentation ready on this topic, so I try to outline in a few short phrases what is important.
Per user: Enable this checkbox unless you are using Varnish and ESI. Disabling it will not have any effect when using Authcache Ajax.
Per page: Enable this checkbox, when the content on the view depends on the page being displayed. For example when showing information on related products on a product display node. If you are using context filters on a page display, then also use per-page caching.
If you use Panels and Views Content Pane, then set authcache-settings on the enclosing pane and not on the view.
If you display a view in a block, it can help when configuring authcache-settings on the block instead of on the view.
Comment #5
weddigen CreditAttribution: weddigen commentedHi, this tip really helped!
in the end the clue was to set the caching settings to "per page", because I am using a contextual filter in the view. Seems to work now.
Thanx again!
weddigen
Comment #6
weddigen CreditAttribution: weddigen commented