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.
i have tried several different settings and i keep viewing the page source and turning on debugging but i dont see anything in the source and none of the debugging gets triggered. I have a pressflow site on acquia and i turned on authcache for all the authenticated roles and i am just testing the homepage but nothing seems to happen.
Comments
Comment #1
drupalninja99 CreditAttribution: drupalninja99 commentedi have tried the simplest default setting $conf['cache_inc'] = './sites/all/modules/contrib/authcache/authcache.inc'; and still nothing happens
Comment #2
drupalninja99 CreditAttribution: drupalninja99 commentedok problem seems to be only on acquia
Comment #3
Jonah Ellison CreditAttribution: Jonah Ellison commentedPressflow does not define the has_js cookie, so Authcache thinks users do not have JavaScript enabled (https://answers.launchpad.net/pressflow/+question/104533).
I'll need to develop a different method to detect JS for Pressflow compatibility, but in the meantime, the workaround would be to add this to your site's JavaScript:
Comment #4
drupalninja99 CreditAttribution: drupalninja99 commentedhmm thats weird bc i test with pressflow on 2 other environments and it works. also acquia does include a settings.inc in the settings.php that assigns some cacherouter values, that might have something to do with it as well. im not getting any errors or anything in the logs, just nothing happens.
Comment #5
drupalninja99 CreditAttribution: drupalninja99 commentedoh it is that, i commented out the cookie line in authcache to make it work and it worked
Comment #6
drupalninja99 CreditAttribution: drupalninja99 commentedwill adding that mess up something pressflow is doing? i imagine they removed that for a reason. i want to use varnish and authcache together.
Comment #7
drupalninja99 CreditAttribution: drupalninja99 commentedi added your fix back to drupal.js but i feel like im trading one problem for another. for varnish to work is creating a cookie right there going to mess up varnish?
Comment #8
Jonah Ellison CreditAttribution: Jonah Ellison commentedYeah, I think you'll need to modify your Varnish config to still serve cached pages to anonymous visitors even if they have the has_js cookie.
Comment #9
drupalninja99 CreditAttribution: drupalninja99 commentedmaybe i should just load js when a user logs in to create that cookie
Comment #10
drupalninja99 CreditAttribution: drupalninja99 commentedI added this to hook_init() and it looks like it works, the idea being to only had a cookie if the user is logged in so as to not add it for anonymous users which messes with varnish. I suppose you could always add a setting somewhere that would trigger this.
Comment #12
superfedya CreditAttribution: superfedya commentedHi,
Where I need to add it?
global $user;
if ($user->uid) {
drupal_add_js("document.cookie = 'has_js=1; path=/';", 'inline', 'header');
}
Thanks
Comment #13
konrad1811 CreditAttribution: konrad1811 commentedI tried
in drupal.js where "killswith" is
but didn't work for me :/
AuthCache was 40ms for anonymous and 300ms for authenticated
Comment #14
simg CreditAttribution: simg commented