Topic-icon Can't login after moving site

Active Subscriptions:

None
8 years 11 months ago - 8 years 11 months ago #52855 by klox7
Hi,

I moved my site to another domain and now I can't login with SCLogin module. In console there is this error

XMLHttpRequest cannot load www.domain.com/modules/mod_sclogin/ajax/otpcheck.php. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'domain.com' is therefore not allowed access.

Regards
Last edit: 8 years 11 months ago by klox7.
The topic has been locked.
Support Specialist
8 years 11 months ago #52856 by mel
Replied by mel on topic Can't login after moving site
Please check to see if you have page caching enabled with the System cache plugin. Our guess is that your site is caching the www version of the site, so when the above tries to load the non-www version, it is not allowed. Can you try either disabling page caching or setting up a redirect from non-www to www?

-Melissa
The topic has been locked.
Active Subscriptions:

None
8 years 11 months ago #52857 by klox7
Replied by klox7 on topic Can't login after moving site
Thank you Melissa, I just cleared cache and now it works. Should have done that myself in first place but I forgot. Regards
The topic has been locked.
Support Specialist
8 years 11 months ago #52861 by mel
Replied by mel on topic Can't login after moving site
Great, glad it was something simple.
The topic has been locked.
Active Subscriptions:

None
8 years 11 months ago #52932 by klox7
Replied by klox7 on topic Can't login after moving site
Hi, login problem happened again but now clean cache doesn't resolve it.
The topic has been locked.
Active Subscriptions:

None
8 years 11 months ago #52933 by klox7
Replied by klox7 on topic Can't login after moving site
Strange, now it's working again. Logged in with normal Joomla form and log out and then I was able to login in with your module.
The topic has been locked.
Support Specialist
8 years 11 months ago #52935 by alzander
The issue is still the same. When you visit your site over www, Joomla seems to be caching the page output. Then, if you visit over non-www, the same cached output from the www site is being returned.

Please either:
a) Setup a redirect so that your site is only accessible over www or non-www. This is the preferred recommendation as it's better for SEO purposes and various other minor reasons if your site can't be accessed through multiple domains.
b) Disable the System - Page Cache plugin

I hope that clarifies things further,
Alex
The topic has been locked.
Active Subscriptions:

None
8 years 11 months ago #52956 by klox7
Replied by klox7 on topic Can't login after moving site
Hi, exactly what I just found out. www works ok, without www not. I don't have System - Page Cache enabled. Regarding redirect I'm planing to do it.

Regards
The topic has been locked.
Active Subscriptions:

None
8 years 11 months ago - 8 years 11 months ago #52957 by klox7
Replied by klox7 on topic Can't login after moving site
Acctually I tested your login module with www and without www on my old site (with old domain) and it works on both url's.

But on the new site I can't login without www but with www it tries to log in but when page refreshes I'm not logged in.
Last edit: 8 years 11 months ago by klox7.
The topic has been locked.
Support Specialist
8 years 11 months ago #52974 by alzander

But on the new site I can't login without www but with www it tries to log in but when page refreshes I'm not logged in.

That's almost always a description of caching. The page is cached, so the non-logged in view is shown. Please disable caching in the Joomla - Global Configuration area or any 3rd party caching extensions you have installed. Also, look for the System - Cache or System - Page Cache plugin and try disabling them to see if that helps. If so, we should be able to help you get them going again.

With that said, I just tried to register on your site and was brought to the profile page stating that some data wasn't filled out. I didn't try to fill it out, but that seems to be an indication that it works for me. I was testing with www.

Thanks,
Alex
The topic has been locked.