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
- Install Drupal CMS with Mercury, enable the page layout module.
- Create the default page layout, keep "Start from your current site", save.
- 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
- Test with a module appending a page suggestion.
- Fix.
Issue fork display_builder-3639496
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
mogtofu33 commentedComment #4
pdureau commentedI reproduce the issue with https://www.drupal.org/project/gin_login (without the need to install Drupal CMS with Mercury).
Fix works well. Thanks.