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_front variable

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's page.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

Command icon 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

bedlam created an issue. See original summary.

bedlam’s picture

Issue summary: View changes
bedlam’s picture

Issue summary: View changes
bedlam’s picture

Issue summary: View changes
rawdreeg’s picture

Thanks for the MR, bedlam.

The changes look good. I will merge and release

rawdreeg’s picture

Status: Active » Fixed

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.