Topic-icon Invalid Token

Active Subscriptions:

None
10 years 2 months ago - 10 years 2 months ago #41837 by totamus
Invalid Token was created by totamus
I consistently receive "invalid token" when using sclogin. If I revert to the joomla login module, the issue goes away.

I have this issue among several sites, and in each it appears to be tied to sclogin. I have tried to determine the exact set of circumstance that causes the issue, but it is not completely consistent. On one site, gregscycles.com, it seems to be much worse than others. In general, it never happens at first login, but will occur when logging in to a second session, or when logging out and back in with just one session.

BEHAVIOR/SYMPTOMS
If I am logged in on the back end, and then login on the front end, I will recieve the error -most- of the time. Less frequently, but often enough to be an issue, the error appears after logging out and back in without a second window and session. I frequently will have multiple logins as I test various front end features and access. I had thought that it was only an issue I would notice as the developer since it seems to be mostly with multiple logins and screens, but my clients are now reporting that they are being locked out when logging out on one computer and back in on another.

The error usually is cleared by clearing the cache on the website. Clearing the local browser cache is usually done as well, as a good measure, but the Joomla cache appears to be the critical item

INSTALLED EXTENSIONS
Gregscycles.com is a busy site, JFBConnect, mijoshop, vikrentcar, RSformpro, HTML5slideshow, and CorePHP's wordpress bridge are the main extensions. Advanced Module Manager, JCH Optimize and popanymodule plugins are also installed. I am sure there are others but these are the main items.

ATTEMPTED TROUBLESHOOTING
Turned off (in the extension manager) JCH Optimize, and then cleared all caches (website and browser) - no affect
Turned of Joomla caching then cleared all caches - no affect
Turned off SClogin, and turned on login - 100% effective in eliminating the issue.

Please advise
Last edit: 10 years 2 months ago by totamus.
The topic has been locked.
Active Subscriptions:

None
10 years 2 months ago #41965 by totamus
Replied by totamus on topic Invalid Token
bump
The topic has been locked.
Support Specialist
10 years 2 months ago #41973 by alzander
Replied by alzander on topic Invalid Token
Sorry for the delay in getting you a response. I'm not sure what's causing that issue, but we'll gladly help investigate. In general, it definitely sounds like a caching issue. The only time we've run into something similar was when the caching in Joomla is enabled.

I know you've done a lot of testing, but I'd like you to try a few more things and let me know how it goes. I know you mentioned you disabled caching in the Joomla cache area, but I can't believe that didn't have an effect. The reason for the 'Invalid Token' message is because a special hidden value on the page that is set by the SCLogin module is incorrect for the current user. The only time we've seen this is with certain combinations of Joomla caching that shows an old token instead of the correct, current one.

Can you:
1) In the Joomla Global Config area, disable caching entirely. Then, clear your browser cache.. otherwise, some of the 'old' cached values may still be present. Test that way and things should work fine as long as you test. Once you enable caching again, I'm assuming problems may happen.
2) When you enable caching, please try "Conservative" caching and not "Progressive". Progressive is lower on the list, so people think it's an improvement over Conservative, but it's actually a little worse for 99% of sites. Unless you have a news type site that's always getting new content (like by the minute), it's not worth it.
3) If "Conservative" causes problems, please then go to the SCLogin module. In "Advanced" set Caching to "Disabled". Then, clear your Joomla *and* browser caches again. Try testing everything again. Hopefully, that will get things going.

The only other question is whether you have the System - Cache plugin enabled. Definitely disable that plugin during the tests above so we can narrow down the underlying cache issue. Once we get through things above, we can help you re-enable the System - Cache plugin if you want to use that as well.

I hope that helps get you started and sorry again for missing this post earlier!

Thanks,
Alex
The topic has been locked.
Active Subscriptions:

None
10 years 2 months ago - 10 years 2 months ago #42079 by totamus
Replied by totamus on topic Invalid Token
I disabled caching entirely, and it did indeed start working. I was positive I had done the same thing earlier - in fact there is no doubt. Normally when I clear the cache on Firefox I do not have the "Clear Active Logins" box checked. This time I did and that must have made the difference because it started working. I had already been using the conservative setting for cache, but tried it again after clearing and the issue returned.

When I disabled the cache in the sclogin module, that took care of the issue (at least for 10 or so times I logged in and out).

I will leave it disable from now on.

MC
Last edit: 10 years 2 months ago by totamus.
The topic has been locked.
Support Specialist
10 years 2 months ago #42083 by alzander
Replied by alzander on topic Invalid Token
Glad to hear you found a solution that worked for you. We'll look into if there's anything different we should be doing with the caching in the SCLogin module. We know caching works on a large amount of sites, so I'm not sure what's different in your case. However, we have heard of this issue a couple of times in the past (which isn't much in the scheme of things).

Of course, should you find any other issues or need anything else, just let us know.

Thanks,
Alex
The topic has been locked.