Topic-icon [SOLVED] Login/Logout error

Active Subscriptions:

None
10 years 4 months ago - 10 years 4 months ago #56699 by Murphz
Hi,
I'm using SC Login with JFBConnect and some other extensions in a website, gospeakenglish.com

Everything's fine except for a login/logout issue appearing only in the Jobs (AdsManager) section, link: gospeakenglish.com/jobs. Any other sections (community -- easysocial / video learning -- easy blog) doesn't have any problem with login or logout.

Problem seems not to be cache related because (I'm not 100% sure about that) with no cache is not working anyway, caching system is jotcache + joomla cache + jch optimize. I've also tried to understand if the problem is related to AdsManager but it really seems related to scLogin to me.

Simply try to use the login modal button (upper right) in the community section gospeakenglish.com/community/dashboard with casual login data. You will be redirected to the same page with the message that login is incorrect (you may occur in invalid token first, just once), doing it in the job section will just refresh the page (you may want to use a test account but the result is the same, a simple refresh). Also, if I login in the community section (logout button appear) and then move to the jobs section, the module loose my logged in status, only for that section (no logout button)....if I come back to the community section, logout button reappear.

Hope this is a SC Login issue, otherwise sorry for disturb :D

Last thing, SC Login module cache is disabled (but it will not change the problem also if enabled).

Thanks,
Andrea
Last edit: 10 years 4 months ago by Murphz.
The topic has been locked.
Active Subscriptions:

None
10 years 4 months ago #56700 by Murphz
Replied by Murphz on topic [SOLVED] Login/Logout error
I confirm that is not cache related. Tried to disable all the cache systems but still no luck, login/logout not working on that section and the logged in status is not kept if in jobs section.
The topic has been locked.
Support Specialist
10 years 4 months ago #56715 by alzander
On the /jobs page, the Login form is getting the following URL to submit to:
/jobs?rootid=0

I don't know what that rootid=0 is, but if I remove that and try to submit again, I'm properly brought back to the EasySocial login page with a notice that my credentials were incorrect. If I leave the ?rootid=0 on, the page just reloads with no warning.

Have you ever seen rootid=?? in the URLs and, if so, do you know what would be putting that in there? We'll need to figure out what's inserting that and why, when present, the form submission isn't working properly.

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

None
10 years 4 months ago #56734 by Murphz
Replied by Murphz on topic [SOLVED] Login/Logout error
Hi,
thanks for the reply.

Today I've made some tests using others login modules with no luck but I've found the error in sh404sef. When disabled everything works fine, still can't understand why but I'm now trying to reinstall it and try again.

The rootid=0 is added by adsmanager menu item (adsmanager list item, you have to choose a root category, if no one is choosen the rootid is equal to 0 in the url). I've managed to redirect jobs?rootid=0 to jobs but the problem was still there.

I'll let you know when I reinstall sh404sef if the problem is solved or not but the problems seems to be sh404sef related.
The topic has been locked.
Active Subscriptions:

None
10 years 4 months ago - 10 years 4 months ago #56737 by Murphz
Replied by Murphz on topic [SOLVED] Login/Logout error
Yes, the problem was with sh404sef. Now the login/logout button is working good. I've removed sh404sef definitely for this website.

A problem still exist anyway. If I login in a section (jobs for example), my status is Logged In and the Logout button is correctly visible. If I then move to another one (home for example, by clicking the logo) the Login/Register buttons appears but if I refresh the page the Logout button is back. There no problems with the login/logout button but it seems that the logged in/logged out status is not kept while navigating the website (only once, then is kept).

There are no cache system enabled now, but this problem still happen. What could it be?

Sent you log in information via PM here.
Last edit: 10 years 4 months ago by Murphz.
The topic has been locked.
Active Subscriptions:

None
10 years 4 months ago #56760 by Murphz
Replied by Murphz on topic [SOLVED] Login/Logout error
Some news:

the problem still exist but the login/logout function is correctly working. Problem is only that a login in Home page, for example, is kept in all the website but the SC Login module (when I move to another menu item) still show the wrong status, if I refresh the page everything's ok.

This only happen with the main menu items, the header menu (Community, Video Learning, Jobs) and the home page logo, always in the header. If you use the footer menu items there are no problems with sc login, logged in/logged out status are ok and you don't need to refresh. After all this is just a visible problem, the login status is ok, is just a view glitch but could confuse users.
The topic has been locked.
Support Specialist
10 years 4 months ago #56764 by alzander
What you describe is almost always caused by caching of some sort. I know you say it's not enabled, but some modules can still perform their own caching of the output. From what I understand, the SCLogin module works and updates properly in the footer area. If so, then whatever is creating that header section should be looked at. I'd check your template's settings for additional caching features to see if that works.

I hope that helps, but if you need anything else, just let me know.

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

None
10 years 4 months ago #56765 by Murphz
Replied by Murphz on topic [SOLVED] Login/Logout error
Hi,
thanks for the reply.

That's strange yes :) anyway, I've tested again and also the footer links have this problem sometimes. I've also tested using another login module (easysocial login module) and the problem still exist so you may have good reason that the problem is inside the tempate. May I ask you for something more detailed to search in the template that can create this problem? I work with joomla from long years but never had to modify or check the login features so I'm a bit lost, maybe you can point me in the right direction.
The topic has been locked.
Active Subscriptions:

None
10 years 4 months ago #56768 by Murphz
Replied by Murphz on topic [SOLVED] Login/Logout error
Hi,
finally is solved.

The problem was in the Expires Headers directives added in .htaccess (browser leverage cache, jch optimize). Don't know which one but probably html (was set to 1 year, setting it to 0 seconds made the trick while keeping others expires headers active).

Sorry for bothering you with something not related to your extensions :D hope this may help in the future.

Will set this post to [SOLVED].

Thanks,
Andrea
The topic has been locked.
Support Specialist
10 years 4 months ago #56773 by alzander
Ahhh.. that makes sense. Setting an expires header on the HTML makes the browser cache what your server sends.. so if that data is the HTML for the page when the user is logged out, the browser will keep showing that view even after they login... until they do a refresh of the page.

Glad you found the issue though. Should you need anything else, just let us know.

Finally, if you haven't already, please consider leaving a rating and review for JFBConnect or SCLogin, or our support, on the Joomla Extension Directory. It's certainly not required, but very appreciated:
JFBConnect - extensions.joomla.org/extensions/extensi...l-display/jfbconnect
SCLogin - extensions.joomla.org/extensions/access-...authentication/24054

Thanks,
Alex
The topic has been locked.