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.
Not for all users and not every time but sometimes users cache is disabled for a session, what could be the reason for this?
Thanks
Nielsvoo
Comment | File | Size | Author |
---|---|---|---|
#3 | no cookie set.jpg | 43.88 KB | nielsvoo |
#1 | 2092185-do-exclude-entire-session-when-message-is-waiting-in-session.patch | 608 bytes | znerol |
Comments
Comment #1
znerol CreditAttribution: znerol commentedThis might be a bug. The cookies
nocache
andnocache_temp
are set whenever there is a message waiting in the session duringhook_exit
. During the next page request, authcache makes sure that the page is not served from the cache in order to have an opportunity to display the message to the user.However I suspect that only
nocache_temp
should be set inhook_exit
and that thenocache
serves a different purpose. From what I understand thenocache
cookie is supposed to exclude a whole user session from the cache - and not only one request.Would you please try and comment out line 509 from authcache.module and report back whether it improves the situation. Alternatively you also may just apply the attached patch.
Comment #2
nielsvoo CreditAttribution: nielsvoo commentedDear znerol ,
Unfortunately this solution didn't fix the problem, still session cookies are disabled sometimes. I attached a screen dump.
I think it is good for you to know user authentication is done by LDAP using SSO.
Thank you for your help
Nielsvoo
Comment #3
nielsvoo CreditAttribution: nielsvoo commentedComment #4
znerol CreditAttribution: znerol commentedThere are two other places the
nocache
cookie might get set.has_js
cookie is missingComment #5
nielsvoo CreditAttribution: nielsvoo commentedOk let's say upon login this cookie isn't set indeed, how to force the browser it will?
Comment #6
znerol CreditAttribution: znerol commentedYou could try to force the cookie-value by placing the following line of code at the end of your
settings.php
file:Comment #7
nielsvoo CreditAttribution: nielsvoo commentedThank you, this solution does the job!
Comment #8
znerol CreditAttribution: znerol commented