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.
Sometimes when I log in I end up at mysite.com/autologout_ajax_get_time_left
and it is just a white page that says:
{"time":-1369372507000}
I'll try to get more info when I have a spare minute.
Comment | File | Size | Author |
---|---|---|---|
#8 | autologout-undefined_autologout_last-2002548-7460942.patch | 650 bytes | johnennew |
#4 | autologout-undefined_autologout_last-2002548-7447014.patch | 657 bytes | johnennew |
#2 | autologout-undefined_autologout_last-2002548-2.patch | 536 bytes | rooby |
Comments
Comment #1
rooby CreditAttribution: rooby commentedThen when I refreshed I was logged in and got this error:
Comment #2
rooby CreditAttribution: rooby commentedComment #3
johnennew CreditAttribution: johnennew commentedHi Rooby - this looks like a sensible patch.
Does it fix both of your issues? There is the notice and redirecting to autologout_ajax_get_time_left. I can't see how the code would cause you to redirect after log in to autologout_ajax_get_time_left and this patch does not look like it addresses this directly.
Comment #4
johnennew CreditAttribution: johnennew commentedHi rooby, I've altered the patch in #2. I think setting it as you have done would leave the time remaining as 0 if the autlogout_last was not set which means you would be logged out? If autlogout_last is not set, I think the time_remaining should be the maximum timeout for the user. I've cleaned up the code a little to demonstrate what is going on.
Can you check if this patch is good?
Comment #5
johnennew CreditAttribution: johnennew commentedSetting to needs review
Comment #6
rooby CreditAttribution: rooby commentedOops, I was in the middle of 2 other things so I wasn't paying enough attention.
Thanks for catching that, your patch looks good to me.
Comment #7
johnennew CreditAttribution: johnennew commentedpatch committed, switching to 6.x-4.x for the back port
Comment #8
johnennew CreditAttribution: johnennew commented6.x-4.x Patch attached.
Comment #9
johnennew CreditAttribution: johnennew commentedtests passed, applied patch.
Comment #10
johnennew CreditAttribution: johnennew commentedI've seen the white screen fault - the redirect URL is changed by system ajax callbacks. I've been working on the javascript as part of #2005776: Add support for JS Timer block in 4.x branches, latest patch does fix this.