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.

Files: 
CommentFileSizeAuthor
#8 autologout-undefined_autologout_last-2002548-7460942.patch650 bytesceng
PASSED: [[SimpleTest]]: [MySQL] 118 pass(es).
[ View ]
#4 autologout-undefined_autologout_last-2002548-7447014.patch657 bytesceng
PASSED: [[SimpleTest]]: [MySQL] 166 pass(es).
[ View ]
#2 autologout-undefined_autologout_last-2002548-2.patch536 bytesrooby
PASSED: [[SimpleTest]]: [MySQL] 166 pass(es).
[ View ]

Comments

Then when I refreshed I was logged in and got this error:

Notice: Undefined index: autologout_last in autologout_ahah_get_remaining_time() (line 324 of /var/www/mysite/sites/all/modules/contrib/autologout/autologout.module).

Status:Active» Needs review
StatusFileSize
new536 bytes
PASSED: [[SimpleTest]]: [MySQL] 166 pass(es).
[ View ]

Status:Needs review» Active

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

StatusFileSize
new657 bytes
PASSED: [[SimpleTest]]: [MySQL] 166 pass(es).
[ View ]

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

Status:Active» Needs review

Setting to needs review

Status:Needs review» Reviewed & tested by the community

Oops, 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.

Version:7.x-4.x-dev» 6.x-4.x-dev

patch committed, switching to 6.x-4.x for the back port

Status:Reviewed & tested by the community» Needs review
StatusFileSize
new650 bytes
PASSED: [[SimpleTest]]: [MySQL] 118 pass(es).
[ View ]

6.x-4.x Patch attached.

Status:Needs review» Fixed

tests passed, applied patch.

I'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.

Status:Fixed» Closed (fixed)

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