Generated with the help of an LLM.

Problem/Motivation

On a site with Gin Login, a page layout that applies on the login page empties it: the login form disappears, and a logged-out administrator can only use drush uli. A layout with no theme component applies under Gin by design since #3632192: A page layout applies on every theme, including one whose components it does not use, and that is what "Start from your current site" creates on Drupal CMS, enabled on save.
The variant renders with the page__display_builder_page_layout suggestion. Gin Login appends page__user__login after it, which wins and prints page.content, empty under a page layout.

Steps to reproduce

  1. Install Drupal CMS with Mercury, enable the page layout module.
  2. Create the default page layout, keep "Start from your current site", save.
  3. Log out and open /user/login: no form.

Proposed resolution

Keep page__display_builder_page_layout last in a hook_theme_suggestions_page_alter() ordered last, as the entity view and Views suggestions already are.

Remaining tasks

  1. Test with a module appending a page suggestion.
  2. Fix.
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

mogtofu33 created an issue. See original summary.

mogtofu33’s picture

Assigned: mogtofu33 » pdureau
Status: Needs work » Needs review
pdureau’s picture

Assigned: pdureau » mogtofu33
Status: Needs review » Reviewed & tested by the community
  1. Install Drupal CMS with Mercury, enable the page layout module.
  2. Create the default page layout, keep "Start from your current site", save.
  3. Log out and open /user/login: no form.

I reproduce the issue with https://www.drupal.org/project/gin_login (without the need to install Drupal CMS with Mercury).

Fix works well. Thanks.