Taking Site Offline Breaks Login Window

Everything to do with Joomla! 3.x templates and templating.

Moderator: General Support Moderators

Forum rules
Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting, this means YOU.
Forum Post Assistant - If you are serious about wanting help, you will use this tool to help you post.
Windows Defender SmartScreen Issues <-- please read this if using Windows 10.
Post Reply
Peakoverload
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 119
Joined: Thu Feb 16, 2006 10:07 pm

Taking Site Offline Breaks Login Window

Post by Peakoverload » Tue Oct 19, 2021 1:48 pm

Following on from another post I made recently, does anyone know what would cause this?

I'm using this template http://demo.joomshaper.com/?template=travelia

If you click on the little person icon above the right column, a login screen appears. Simple enough.

I installed this template on my live site and everything was working. Then, some time later, whilst still developing the site, I noticed that the login screen wouldn't appear when clicked on. I also noticed that if I unpublished the login module, the icon wouldn't disappear. Clearing the site cache, browser cache and even using a different computer made no difference.

I then decided to set up a local test server using xampp and installed the same template. Again, the login screen was working so I figured I must have set a setting incorrectly in my live site so I went through every single module, plugin, component and config trying to find what was different.

In the end the only difference I could find was that my live site is set to offline whilst I develop it. So I set my localhost site to offline and tried clicking on the login icon.

Aha! The login screen didn't appear so being offline also prevents login. I can kinda see that makes sense. However. I then tried unplublishing the login module and again the login icon did NOT disappear from the front end. I then republished the module and made the site live again. But now the login screen didn't come back to life, it still won't appear when you click on the icon!

Nothing I try on either site makes it work again. It's like once you've set the site to offline, something somewhere is remembering that even when the site is set to live again.

I even tried doing a new fresh install on a new xampp server and again took the site offline and back on again and yet again the login window no longer works!

I don't know whether this is a template issue, a Helix framework issue, a Joomla issue or a server config issue I've reported this to Joomshaper but not yet had a response but I wondered if anyone knew what could cause something like this to happen as I'm at a total loss.

User avatar
toivo
Joomla! Master
Joomla! Master
Posts: 13814
Joined: Thu Feb 15, 2007 5:48 am
Location: Sydney, Australia

Re: Taking Site Offline Breaks Login Window

Post by toivo » Tue Oct 19, 2021 8:29 pm

Mod note: moved the topic from 3.x Administration to 3.x Templates.
Toivo Talikka, Global Moderator

User avatar
Per Yngve Berg
Joomla! Master
Joomla! Master
Posts: 28314
Joined: Mon Oct 27, 2008 9:27 pm
Location: Romerike, Norway

Re: Taking Site Offline Breaks Login Window

Post by Per Yngve Berg » Tue Oct 19, 2021 8:39 pm

1) The login form in offline status is rendered by the file offline.php

2) After entering the site while offline, you are already logged in. The login module will show a logout button instead of the login form.

Peakoverload
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 119
Joined: Thu Feb 16, 2006 10:07 pm

Re: Taking Site Offline Breaks Login Window

Post by Peakoverload » Tue Oct 19, 2021 9:35 pm

I understand that but what I’m saying is that once the site has been set to offline, if you then set it back to online the login window doesn’t come up. Not only that but if you then unpublish the login module, it doesn’t disappear from the front end. The icon is still present but is inactive.

Peakoverload
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 119
Joined: Thu Feb 16, 2006 10:07 pm

Re: Taking Site Offline Breaks Login Window

Post by Peakoverload » Wed Oct 20, 2021 10:47 am

Okay well I've discovered the cause.

If you are logged in on the front end, the site is then put offline in the back end the login form no longer works which is to be expected. If you put the site back online and refresh the page on the front end, the login form still does not work.

The only way to rectify this is to log out of the front end. Now the login form will work and if you log back in on the front end it still works.

So there is something in how Joomla remembers users that is remembering whether the site is offline or online. I presume a cookie.

User avatar
sozzled
Joomla! Master
Joomla! Master
Posts: 11237
Joined: Sun Jul 05, 2009 3:30 am
Location: Canberra, Australia

Re: Taking Site Offline Breaks Login Window

Post by sozzled » Wed Oct 20, 2021 7:29 pm

Question: in the Global Configuration settings, do you have (Site tab): Shared sessions = Yes ???
“If you think I’m wrong then say, ‘I think you’re wrong.’ If you say ‘You’re wrong!’, how do you know?” :)

Peakoverload
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 119
Joined: Thu Feb 16, 2006 10:07 pm

Re: Taking Site Offline Breaks Login Window

Post by Peakoverload » Wed Oct 20, 2021 8:31 pm

sozzled wrote:
Wed Oct 20, 2021 7:29 pm
Question: in the Global Configuration settings, do you have (Site tab): Shared sessions = Yes ???
Just checked and it's set to No.
Session handler = Database
Session Lifetime =15
Shared Sessions =No

User avatar
sozzled
Joomla! Master
Joomla! Master
Posts: 11237
Joined: Sun Jul 05, 2009 3:30 am
Location: Canberra, Australia

Re: Taking Site Offline Breaks Login Window

Post by sozzled » Wed Oct 20, 2021 8:38 pm

Thanks for your reply. I wish I could help you with your problem but I'm just making a few guesses here.

One thought I would offer for your consideration is to change the setting for Session handler = PHP. It may not solve the problem but it's just an idea.
“If you think I’m wrong then say, ‘I think you’re wrong.’ If you say ‘You’re wrong!’, how do you know?” :)

Peakoverload
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 119
Joined: Thu Feb 16, 2006 10:07 pm

Re: Taking Site Offline Breaks Login Window

Post by Peakoverload » Wed Oct 20, 2021 8:40 pm

sozzled wrote:
Wed Oct 20, 2021 8:38 pm
Thanks for your reply. I wish I could help you with your problem but I'm just making a few guesses here.

One thought I would offer for your consideration is to change the setting for Session handler = PHP. It may not solve the problem but it's just an idea.
Thanks for trying, much appreciated. I'll give it a go and see what happens.


Post Reply

Return to “Templates for Joomla! 3.x”