You should be automatically logged in and land on open protected page.
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.
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
Labels |
Added:
?
|
Category | ⇒ | Authentication Front End |
i wonder, can we do in an alternative way just loading first plg_system_remember plugin and after plg_system_languagefilter changing the system plugin order?
@brianteeman Hi Brian, is this enough? sakicnet@d6fa7f9
@alikon: no, not really. Remember plugin does the login, which triggers onUserLogin events, which builds the menu before user is logged in. So it would involve bigger structural changes to fix it.
We shouldn't be direct calling __construct()
again after an object is already constructed. Especially because it could result in class properties being changed. What you really need to do is call the load()
method.
JMenu::load()
is public. There's no need to make any other changes than to (re-)call the load()
method.
Wait, nevermind. Realizing you need an updated JUser
object too.
Either way, you shouldn't reconstruct an object. A new one should be loaded in replacing the existing one.
JMenu::load() doesn't fix the issue. What we need is $menu->user->load($id)
OK, will try that.
Putting public setters for the properties (at least a setUser()
method) would help. Then you'd just need to do $this->app->getMenu()->setUser($user)->load();
.
Status | New | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2017-05-05 14:37:25 |
Closed_By | ⇒ | zero-24 |
Status | Closed | ⇒ | New |
Closed_Date | 2017-05-05 14:37:25 | ⇒ | |
Closed_By | zero-24 | ⇒ |
Maintainers please action the request above
Status | New | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2022-08-23 19:33:08 |
Closed_By | ⇒ | zero-24 | |
Labels |
Added:
No Code Attached Yet
Removed: ? |
That PR is against staging which does not exists anymore and the PR can not be reopend but need to be created against 4.x-dev
Status | Closed | ⇒ | New |
Closed_Date | 2022-08-23 19:33:08 | ⇒ | |
Closed_By | zero-24 | ⇒ |
Labels |
Added:
?
|
Labels |
Added:
bug
|
Labels |
Removed:
?
|
@sakicnet can you submit this as a PR please Emir