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.
When a site runs in maintenance mode, authcash can not find the memcache backend.
This can be tricky when a site is deployed an a live server and it is first tested.
Is this a bug or is there mandatory part of drupal disabled in maintenance mode and do we need to add this to the readme file?
Comments
Comment #1
znerol CreditAttribution: znerol commentedThanks for the report. I tried to reproduce the issue on a fresh install using the memcache setup documented in the Authcache 2 tuning guide - avoid the database. That seems to work without any issues in maintenance mode though.
Could you please provide more information on your setup? What is in your
settings.php
? Which memcache module and which PECL extension are you using?In addition please provide the exact error message with filename and line-number, that would help narrowing down the set of possible causes.
Comment #2
mvdve CreditAttribution: mvdve commentedFirst: amazing module! really well designed.
I tested this issue on two systems:
- Ubuntu 14.04 with a lamp stack with php 5.5 and the memcache 3.0.8 extension from the ubuntu pecl repository.
- CentOS 6.6 with lamp stack with php 5.5 within a directadmin install. Here is also the memcache 3.0.8 extension installed.
The site also uses domain access. So the settings.php file config lookes like:
There is no error message withing Drupal or PHP. The authcache debug module gives the following information:
Comment #3
znerol CreditAttribution: znerol commentedOh, so the debug module flags the a page request as not being cachable when maintenance mode is enabled and an admin user is logged in? If that's the case, then the explanation is simple: Drupal shows a message on every page to admins when in maintenance mode (reads something like Operating in maintenance mode. Go online.). Because messages are user-specific (they are stored in the session), Authcache will refuse to store a page with a message on it. Also if there are messages pending in the session, it will not attempt to load a page from the cache.
Admittedly the messages reported by the debug widget are quite confusing and do not really pinpoint the real cause.
Comment #4
mvdve CreditAttribution: mvdve commentedThat's a clear explanation. I did some further testing and as long as a user has maintenance mode access (independent of the role) the drupal message is set which results in the message Excluded: No active cache backend.
Comment #5
pribeh CreditAttribution: pribeh commentedSorry, I don't understand how this issue is resolved. I get the "excluded" message whenever the site is in maintenance. Is there a way around this? Thanks!
Comment #6
znerol CreditAttribution: znerol commented@pribeh, do you get the excluded message for administrative users or for anonymous users?
Comment #7
pribeh CreditAttribution: pribeh commented@znreol, user 1. Note, I do have caching for user 1 turned on.
Comment #8
znerol CreditAttribution: znerol commentedIf you are browsing your site as an administrator in maintenance mode, then Drupal displays a message on each page reading something like Operating in maintenance mode. Go online.
Authcache will never ever cache a page if a message is displayed or if one is pending, because messages are user specific.
Comment #9
pribeh CreditAttribution: pribeh commented@znreol. Got it! Thanks.