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:
Messagebox

There is just an ajax throbber shown:
Throbber

This is the javascript error message:
Javascript error

I will provide a patch to fix this.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

stefan.korn created an issue. See original summary.

stefan.korn’s picture

stefan.korn’s picture

This 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.

stefan.korn’s picture

Assigned: stefan.korn » Unassigned
Status: Active » Needs review
reijkie’s picture

Same 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.

stefan.korn’s picture

Since 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?

reijkie’s picture

Thanks 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!

stefan.korn’s picture

Further 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.

guptahemant’s picture

Status: Needs review » Reviewed & tested by the community

Thanks 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.

AjitS’s picture

Status: Reviewed & tested by the community » Postponed (maintainer needs more info)

Thank 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.

stefan.korn’s picture

@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.

  • AjitS committed 68ee8af on 7.x-4.x authored by stefan.korn
    Issue #2921466 by stefan.korn: Reset message box not shown on admin...
AjitS’s picture

Status: Postponed (maintainer needs more info) » Fixed

@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

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.