? ? Pending

User tests: Successful: Unsuccessful:

avatar sakicnet
sakicnet
5 May 2017

issue: #15824

Steps to reproduce the issue

  • Install Joomla 3.7 (or 3.7.1-dev)
  • Create a menu link with Access set to Registered (e.g. /test)
  • Enable System - Language Filter plugin (required for multi-lingual sites)
  • Login on frontend with "Remember me" checkbox ticked
  • Wait 15 minutes for session to expire ;) (not really, just remove your session cookie, or delete the session record from #__session table)
  • Visit the protected page (e.g. /en/test)

Expected result

You should be automatically logged in and land on open protected page.

Actual result

You are redirected to frontpage with message:
Error: You are not authorised to view this resource.
If your homepage requires access then you end up on 403 page.

System information (as much as possible)

What happens is that the language filter plugin builds the menu with access levels before the remember plugin had a chance to login the user. The menu is built with access levels of the guest user and updates only on refresh. So, on first visit, after the session expires, the menu thinks it's a guest and denies the access.

The quick fix is to re-build the menu after the remember plugin has logged in the user.
Here is the Gist, line 66: https://gist.github.com/sakicnet/f2b8e2486011093d08e544423d8e5124

Additional comments

avatar sakicnet sakicnet - open - 5 May 2017
avatar sakicnet sakicnet - change - 5 May 2017
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 5 May 2017
Category Libraries Front End Plugins
avatar sakicnet sakicnet - change - 5 May 2017
Labels Added: ?
avatar zero-24 zero-24 - change - 5 May 2017
The description was changed
avatar zero-24 zero-24 - edited - 5 May 2017
avatar roland-d
roland-d - comment - 22 Jul 2018

@sakicnet Could you please fix the conflict so I can get this tested over the next 2 days? Thank you.

avatar Tchangue Tchangue - test_item - 23 Jul 2018 - Tested successfully
avatar Tchangue
Tchangue - comment - 23 Jul 2018

I have tested this item successfully on 464abcf

You just have to remove one of the articles you created for your menu

@icampus


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/15839.

avatar infograf768
infograf768 - comment - 23 Jul 2018

hmmm...
#21230

avatar priiish priiish - test_item - 24 Jul 2018 - Tested successfully
avatar priiish
priiish - comment - 24 Jul 2018

I have tested this item successfully on 464abcf

After cookie expiration user is now being asked to log in (instead of 403 error) - works.

#21230

@icampus


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/15839.

avatar franz-wohlkoenig franz-wohlkoenig - change - 24 Jul 2018
Status Pending Ready to Commit
avatar franz-wohlkoenig
franz-wohlkoenig - comment - 24 Jul 2018

Ready to Commit after two successful tests.

avatar roland-d
roland-d - comment - 24 Jul 2018

I am going to close this in favor of #21230 because there is a merge conflict on this one. Thanks everybody for contributing.

avatar roland-d roland-d - close - 24 Jul 2018
avatar roland-d roland-d - change - 24 Jul 2018
Status Ready to Commit Closed
Closed_Date 0000-00-00 00:00:00 2018-07-24 09:30:18
Closed_By roland-d
Labels Added: ?

Add a Comment

Login with GitHub to post a comment