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.
While calling drupal_get_messages, for example, drupal_get_messages('error'), intend to clear the error messages, then the $_SESSION['messages'] becomes an empty array. Thus, _authcache_is_cacheable function will always return FALSE because isset($_SESSION['messages']) is TRUE, in authcache.helper.inc line 59.
Attached is a patch file which checks also if $_SESSION['messages'] is not empty before returning cacheable as FALSE.
Comment | File | Size | Author |
---|---|---|---|
authcache.helpers.inc_.patch | 521 bytes | balawang | |
Comments
Comment #1
znerol CreditAttribution: znerol commentedIn Authcache 7.x-2.x we use this code fragment:
Do you think that this approach would also work in Authcache 7.x-1.x?
Comment #2
balawang CreditAttribution: balawang commented@znerol, this code fragment also works, it's simpler and clean. I will go with your solution.
Cheers,
Bala
Comment #4
znerol CreditAttribution: znerol commentedThank you for reporting the issue. A modified version of the patch has been committed and is now part of the 7.x-1.x-dev version.