Foren

Session Timeout Warning in Firefox

Edgar G., geändert vor 12 Jahren.

Session Timeout Warning in Firefox

New Member Beiträge: 23 Beitrittsdatum: 24.10.11 Neueste Beiträge
Hey Guys,

I have session.timeout = 3 and session.timeout.message = 1. This way a timeout message will appear after being signed in for 2 minutes.

It's working fine in IE but it is not appearing in Firefox. This is surprising. emoticon

Anyone encounter this issue before or can point me in the right direction to get this fixed?

Thanks
thumbnail
David H Nebinger, geändert vor 12 Jahren.

RE: Session Timeout Warning in Firefox

Liferay Legend Beiträge: 14919 Beitrittsdatum: 02.09.06 Neueste Beiträge
Are you using a custom theme? The display of the message will be controlled via CSS so, if you don't have your CSS right, that could be the problem. Also are you seeing any errors in FF side, like scripting errors or something?
Edgar G., geändert vor 12 Jahren.

RE: Session Timeout Warning in Firefox

New Member Beiträge: 23 Beitrittsdatum: 24.10.11 Neueste Beiträge
David,

Yes, I am using a custom theme. However, I went ahead and applied the classic theme and I am still having the same issue.

When the session ends a div is placed on the page with the message "Warning! Due to inactivity, your session has expired. Please save any data you may have entered before refreshing the page." This also does not appear in firefox. I cannot find the div with firebug but, in IE, I can find the div with the IE developer tools.

Something else I noticed is that in IE I can see the following JavaScript/JQuery? inside the source:

function(){Liferay.Session.init({autoExtend:false,timeout:2,timeoutWarning:1,redirectOnExpire:false,redirectUrl:"http://localhost:8080/web/guest"}


but it is not present in the Firefox source.
thumbnail
David H Nebinger, geändert vor 12 Jahren.

RE: Session Timeout Warning in Firefox

Liferay Legend Beiträge: 14919 Beitrittsdatum: 02.09.06 Neueste Beiträge
Hmm, which version of Liferay are you using?
Edgar G., geändert vor 12 Jahren.

RE: Session Timeout Warning in Firefox

New Member Beiträge: 23 Beitrittsdatum: 24.10.11 Neueste Beiträge
Liferay 6.0 EE

Browser: Firefox 10.0.1

OS: Windows XP SP3

I will keep investigating.
Edgar G., geändert vor 12 Jahren.

RE: Session Timeout Warning in Firefox

New Member Beiträge: 23 Beitrittsdatum: 24.10.11 Neueste Beiträge
Ok, so I found the source of the problem (in my case). In session_timeout.jspf Liferay.Session.init was never created in Firefox because of the following:


String autoRememberMe = CookieKeys.getCookie(request, CookieKeys.REMEMBER_ME);
<c:if test="<%= Validator.isNull(autoRememberMe) %>">
</c:if>


Validator.isNull(autoRememberMe) was returning false because there was a cookie available in FireFox. The Liferay.Session.init script is within the scope of the if statement mentioned above. I do not understand why it is skipped if there is a cookie. Time to do some more research emoticon

Anyone have an idea?

To fix this I cleared my cookies and now I'm getting the desired timeout warning.
thumbnail
David H Nebinger, geändert vor 12 Jahren.

RE: Session Timeout Warning in Firefox

Liferay Legend Beiträge: 14919 Beitrittsdatum: 02.09.06 Neueste Beiträge
Well, remember me will automatically log you back in when you access the portal page again. Seeing that any stateful information would have been lost, however, this is not going to prove to be very helpful...

If you have stateful portlets, you might want to consider disabling the 'remember me' function since it would lead to more problems than it would solve...