Page 1 of 1

LOGOUT problem with new Joomla 4.0.3 installation

Posted: Fri Sep 24, 2021 8:21 am
by liaskas
Weird issue with frontend

Clean installation of joomla (uploaded files, created bd etc). Went fine!

Created a new menu item of "User Profile" type just for testing purposes.

After installation i login as admin (frontend)

Both menus... home and User Profile work fine for some time. They take me to the right places.

Then i logout, relogin and stay at the home page.

I hit on ctrl + F5 (refresh) after 5 sec.

The site logs me out!

Tried again...

I login again.

CTRL + F5 works for one time. I am still connected.

CTRL + F5 again logs me out.

Can someone please advise?

I have uninstalled and installed joomla 4 times so far. Always the same problem.

Re: LOGOUT problem with new Joomla 4.3 installation

Posted: Fri Sep 24, 2021 8:27 am
by ghazal
What's your database?
MySQL or MariaDB?

Re: LOGOUT problem with new Joomla 4.3 installation

Posted: Fri Sep 24, 2021 8:32 am
by liaskas
MySQLi

Re: LOGOUT problem with new Joomla 4.3 installation

Posted: Fri Sep 24, 2021 10:36 am
by gws
@ Liaskas MySqli is the db connector not the DB type.

Re: LOGOUT problem with new Joomla 4.3 installation

Posted: Fri Sep 24, 2021 11:29 am
by Webdongle

Re: LOGOUT problem with new Joomla 4.0.3 installation

Posted: Fri Sep 24, 2021 5:59 pm
by liaskas
Database Type mysql

Re: LOGOUT problem with new Joomla 4.0.3 installation

Posted: Fri Sep 24, 2021 6:45 pm
by sozzled
liaskas wrote:
Fri Sep 24, 2021 8:21 am
I logout, relogin and stay at the home page.

I hit on ctrl + F5 (refresh) after 5 sec.

The site logs me out!

Tried again ... I login again. CTRL + F5 works for one time. I am still connected. CTRL + F5 again logs me out.
I cannot reproduce this. From where did you obtain the J! 4 installation package (that you have installed several times)? What web browser are you using to click CTRL+F5?

Re: LOGOUT problem with new Joomla 4.0.3 installation

Posted: Sat Sep 25, 2021 4:30 am
by liaskas
Downloaded joomla Joomla_4.0.3-Stable-Full_Package.zip from joomla.org

I have tested with firefox and chrome. Same result with both browsers.

Something i forgot to mention.

I am installing joomla in a subdirectory (do not know if this may be related)

https://domain.com/new

Re: LOGOUT problem with new Joomla 4.0.3 installation

Posted: Sat Sep 25, 2021 5:10 am
by sozzled
Yes, installing J! in a sub-folder of another J! website is "related". Depends on whether you made the necessary .htaccess changes to allow things to work. Did you read the information in the documentation about installing J! in a sub-folder of another website?

Are the two websites sharing the same database tables? Are you using the database to manage user sessions?

Re: LOGOUT problem with new Joomla 4.0.3 installation

Posted: Sat Sep 25, 2021 5:40 am
by liaskas
There is no relation at all between the two joomla installations.

Different database...
.htaccess of the installation that has the problem is the default that comes with the joomla installation

I am talking about a completely different site installed in a subdirectory.

Re: LOGOUT problem with new Joomla 4.0.3 installation

Posted: Sat Sep 25, 2021 6:11 am
by sozzled
Are you using a .htaccess file in the sub-folder?

Re: LOGOUT problem with new Joomla 4.0.3 installation

Posted: Sat Sep 25, 2021 6:20 am
by liaskas
Yes... renamed the htaccess.txt to .htaccess

Settings in configuration...

Search Engine Friendly URLs -> Yes
Use URL Rewriting -> Yes

I also see that with Chrome i can not login as Admin to backend. It gives the following all the time...
The security token did not match. The request was aborted to prevent any security breach. Please try again.

With firefox i can login to backend.

Re: LOGOUT problem with new Joomla 4.0.3 installation

Posted: Sat Sep 25, 2021 6:27 am
by sozzled
OK. There's nothing particularly wrong with installing J! in a sub-folder of another J! website—you just need to be a bit more careful—and I don't do that myself. I always create a separate folder: one folder for each website. (I even create a separate database for each website!) 8)

Look at lines 84-90 of your .htaccess file in the sub-folder's "root". See the instructions?

Lastly: what are you using for System » Global Configuration » System » Session Handler ???

Re: LOGOUT problem with new Joomla 4.0.3 installation

Posted: Sat Sep 25, 2021 7:35 am
by liaskas
Lines 84-90 of your .htaccess file
##
# Uncomment the following line if your webserver's URL
# is not directly related to physical file paths.
# Update Your Joomla! Directory (just / for root).
##

The following line is # RewriteBase /

Uncommented RewriteBase. Nothing changed.

With RewriteBase uncommented i disabled "Search Engine Friendly URLs".

Now i can change pages using the menu items without losing connection. But still... page refresh logs me out.

Session handler is database. Tested also Files but it has the same problem.

Re: LOGOUT problem with new Joomla 4.0.3 installation

Posted: Sat Sep 25, 2021 7:39 am
by sozzled
Thanks. Change Session Handler = Filesystem. Pressing F5 (or CTRL+F5) should not log you out.

We may find some other reason why your website is not working if you use the Forum Post Assistant and post the report here.

Image

Re: LOGOUT problem with new Joomla 4.0.3 installation

Posted: Sat Sep 25, 2021 5:02 pm
by Webdongle
If you uncommented #RewriteBase /
Did you add the subdirectory to the path?
e.g.
RewriteBase /subdirectory

Or perhaps you added the the path without uncommenting?

Make sure the livesite var (in configuration.php) is not given a value in any of the folders

N.B.
If the site (in the subdirectory) has been created as a sub domain then it is root (/) of the subdomain not root path (/subdirectory).