Problem/Motivation
We've noticed some issues, and a "missing" feature:
- issue 1: homepage setting not honoured in certain circumstances
- issue 2: redirect not honoured in certain circumstances
- "missing" feature: the module doesn't handle Twig's
is_frontvariable
Steps to reproduce
Issue 1: homepage not honoured if no roles selected
According to the field's description, "If no roles are selected, the frontpage will be applied to all authenticated users."
But setting any "Authenticated User frontpage path" while not checking any role in "Select roles to apply the frontpage to" results in the frontpage path not being honoured for authenticated users.
This is consistent whether or not the "Redirect anonymous users from authenticated homepage" box is checked.
Issue 2: redirect fails when using node and when using path on multilangual sites
So e.g.:
- with frontpage node set to "Home (123)", the redirect always fails as far as I can tell
- with frontpage node set to "/home" and "Enter path instead of node" checked, the redirect fails on multilanguage sites using the language prefix in the URL
"Missing" feature: Twig's is_front variable is false for authenticated users on authenticated homepage
- add
<p>is_front: {{ is_front }}</p>to the current theme'spage.html.twig - clear the cache
- visit the authenticated frontpage node as a user with one or more allowed role
Proposed resolution
I've identified the causes, I think. I'll prepare a MR.
Remaining tasks
Create merge request.
User interface changes
None required.
API changes
None required.
Data model changes
Issue fork authenticated_frontpage-3589240
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #3
bedlamComment #4
bedlamComment #5
bedlamComment #6
rawdreeg commentedThanks for the MR, bedlam.
The changes look good. I will merge and release
Comment #7
rawdreeg commented