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.
Since latest version of Autologout (4.5) the message box that let the user reset the expiring session is not shown anymore. These seems only to happen on admin pages (when the admin theme is loaded).
Since this is a serious regression, I set priority to major.
When this problem happens there will be a javascript error thrown.
I put some screenshot here to explain.
This box is not shown on admin pages:
There is just an ajax throbber shown:
This is the javascript error message:
I will provide a patch to fix this.
Comment | File | Size | Author |
---|---|---|---|
#2 | Reset_message_box_not_shown-2921466-002.patch | 714 bytes | stefan.korn |
| |||
autolog_error2.PNG | 8.32 KB | stefan.korn | |
autlog_error1.PNG | 9.81 KB | stefan.korn | |
message_box.PNG | 5.5 KB | stefan.korn |
Comments
Comment #2
stefan.kornComment #3
stefan.kornThis patch fixes the problem for me.
I think the problem was introduced with fix on this issue https://www.drupal.org/node/2469177 / http://cgit.drupalcode.org/autologout/commit/?id=c5c3ec5
Now there are cases when response-variable contains more than three array values, therefore my patch proposes to walk through the response array and search for the value instead of going hardcode to array value "2" like before.
Comment #4
stefan.kornComment #5
reijkie CreditAttribution: reijkie commentedSame problem here. Don't have the js error though. Thanks for your fix, however it isn't working on my end unfortunately. The popup keeps hiding and "please wait" with the throbber keeps showing. Actually I have 2 of those.
Comment #6
stefan.kornSince you have 2 throbbers are you in "administrative overlay"? Maybe try it without administrative overlay once, directly on frontend and backend theme and see what is happening there.
What themes are you using for frontend and backen?
Comment #7
reijkie CreditAttribution: reijkie commentedThanks for replying! After further investigation, it seems the "?q=" changes in the ajax urls seem to break things in my config. There's a redirect in place for the home page here. So never mind!
Comment #8
stefan.kornFurther testing and experiences on different sites gave different results. Some are working, some are not.
However I was able to reproduce this on a vanilla D7 installation, where it seems to be related with the overlay module which is enabled by default.
On sites where overlay is disabled, this does not seem to happen. But I had another site where overlay is disabled and it still showed this error. There it seemed to be related to colorbox module.
Comment #9
guptahemant CreditAttribution: guptahemant as a volunteer and at QED42 commentedThanks for the patch @stefan.korn
I also encountered the mentioned issue recently and attached patch does resolve the issue. Also it seems related to colorbox as well when i encountered it.
Marking this as RTBC as it does solves the issue and approach looks good.
Comment #10
AjitSThank you for reporting this and for the patch and reviews! I am not sure however if I should commit the patch from #2. There are mixed reports from the community members about the fact that this issue is could be related to the overlay module or the colorbox module. The hesitancy is also because I maintain the 8.x version of the module and am only committing the RTBC issues on 7.x version to keep it maintainable.
However, without proper steps to reproduce in both cases, I do not think it would be wise to move forward with this.
Comment #11
stefan.korn@AjitS: Thanks for your reply.
It is some time ago now, since I encountered this issue. But at that time I could reproduce it in a vanilla D7 installation.
In general, I think the approach to call like this for the time setting has its flaws:
callback(response[2].settings.time);
and is prone to problems if some other modules are doing something to the response. So from my point of view it would be better to change this even if not directly related to the problem described in this issue.
If you tell me, what kind of evidence for the issue you'd like to see, I might take a look again and provide you with more information.
Comment #13
AjitS@stefan.korn - Thank you for getting back! While I was testing other patches I came across this issue on my vanilla D7 installation. And it was without the overlay module or the colorbox module. And you were right - the approach for
callback(response[2].settings.time);
doesn't look bulletproof. This patch fixes the error. Committed and pushed to 7.x-4.x