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.
Sometime when I have been logged out due to inactivity and then log in again, I end up at http://example.com/autologout_ahah_logout and the screen is a blank white screen (if I inspect the source code there is none).
There are no errors in the logs.
It possibly happens only when you get your password wrong, but I'll have to try to confirm that.
I'll see if I can work out a consistent way to make it happen.
Comment | File | Size | Author |
---|---|---|---|
#13 | autologout-user_login_timeout_reset-2092613-13.patch | 428 bytes | rooby |
#6 | autologout.code_.2092613-6.patch | 673 bytes | johnennew |
Comments
Comment #1
johnennew CreditAttribution: johnennew commentedHi Rooby, If you are able to replicate can you try the latest dev release and see if it is already fixed there?
I think the problem is to do with the drupal_get_destination() method which will provide that as the destination for the callback in odd situations. I thought this had been fixed in 4.2 but maybe its still in dev. It may be there are other situations this happens in though.
Comment #2
johnennew CreditAttribution: johnennew commentedHi @Rooby - were you able to replicate this at all?
Comment #3
rooby CreditAttribution: rooby commentedIt definitely still happens but I haven't tried to pinpoint when yet.
I am back on this project in the next day or two and will report back then.
Comment #4
rooby CreditAttribution: rooby commentedThis is still happening but there seems to be no pattern.
Sometimes it happens after I have been auto logged out and try to log back in (regardless of if I enter the right password or now), but sometimes it doesn't happen.
Also, sometimes it happens when I freshly navigate to the site and try to log in, without having been recenly auto logged out.
I haven't had a chance to properly debug yet.
Comment #5
rooby CreditAttribution: rooby commentedIn the drupal watchdog log I have these two messages one after the other:
Session opened for username.
Session automatically closed for username by autologout.
Comment #6
johnennew CreditAttribution: johnennew commentedHi @rooby, I wonder if the session time autologout_last is being saved in the session and not reset during login and being loaded from the session table. If an old value is reloaded then the user will immediately be logged out.
Can you review the following patch?
Comment #7
rooby CreditAttribution: rooby commentedI was wondering about that too - and this as a possible solution.
I tried for a while today to work out how to reproduce the error reliably so I could test and had no luck.
I will try again tomorrow (along with the patch), I am doing a lot of work on this project this week.
Comment #8
rooby CreditAttribution: rooby commentedI'm not sure why exactly the session would not be clearing but if it wasn't, then the check against autologout_last could potentially give this unexpected result.
However, in this case, after checking the time left the dialog should pop up right?
Another thing I see is in the js:
This means that confirmLogout could possibly be called without ever seeing the dialog, but in my debugging it seems that timeout padding is always 15 seconds and the process of logging in and getting the white screen is no where near that long (although I am checking the timeout padding value at the php level, not the js level).
Plus the only use of the autologout_ahah_logout url as far as I can tell is via ajax so to end up on that page means there is something going wrong.
I really want to know the exact cause of this, it's bugging me :)
Anyway, I'm just going to apply your patch now and see if the problem stops.
Generally it happens to me every morning the first time I log into the site but then not again if I try to reproduce it, so I should know in the next day or two if it has stopped it.
Comment #9
rooby CreditAttribution: rooby commentedAfter upgrading to dev I see the whole hook_user_login() is new and maybe that session cleanup could help things.
Maybe I will first try latest dev without the patch and then if it still happens, with the patch.
Comment #10
rooby CreditAttribution: rooby commentedI haven't seen this issue for a few days and I usually see it every day so I think updating to the latest dev has fixed the issue.
Closing for now and I will reopen if it comes back.
Also, feel free to reopen if you want to commit your patch from #6, but it doesn't seem to be needed.
Comment #11
johnennew CreditAttribution: johnennew commentedThanks for reporting back on this @rooby, I think a new release is needed.
I'm going to get this issue sorted and then roll a new release:
#2014473: AJAX ERROR 404 NOT FOUND
Comment #12
rooby CreditAttribution: rooby commentedI have had this happen again twice this week, although it is still definitely happening less often than before.
I will try the patch out and see if it helps and doesn't ahve any negative effects.
Comment #13
rooby CreditAttribution: rooby commentedHere is a new version that applies to latest dev. Same functionality.
Comment #14
johnennew CreditAttribution: johnennew commentedHi Rooby,
Do you think it could be related to the following issue?
https://drupal.org/node/2129297
Comment #15
rooby CreditAttribution: rooby commentedIn my case I don't think so.
I don't remember seeing any ajax urls like that and the site doesn't really have much in the way of ajax functionality anyway.
Comment #16
rooby CreditAttribution: rooby commentedToday I have seen the error again, with the patch.
It doesn't happen all the time though and I don't know how to reliably reproduce it.
Comment #17
johnennew CreditAttribution: johnennew commentedChanging the status to needs work. If anyone can supply further details to replicate this bug that would be helpful.
Comment #18
johnennew CreditAttribution: johnennew at Deeson commented