Incompatibility with Drupal WXT - Warning: Undefined array key "render element" in drupal_find_theme_templates() (line 291 of core/includes/theme.inc).

Created on 14 October 2022, over 2 years ago
Updated 21 October 2023, over 1 year ago

Problem/Motivation

When this module is installed in combination with the Drupal WXT install profile we get an error that appears due to having a conflict with the naming of the theme templates. More specifically it is the gin_login__theme() function where the template name is defined.

The module uses "page--user--login", however in the WXT profile there is also a page template that begins with the same pattern "page--user--login--gcweb", the core function drupal_find_theme_templates() incorrectly picks this up and calls the preprocess function "gin_login_preprocess_ginlogin" when it should not be called. We then get this warning appearing on pages following a cache clear.

I do think this issue can occur in other websites not using Drupal WXT and the "variables" key should be defined in the _theme function regardless.

Error message
Warning: Undefined array key "render element" in drupal_find_theme_templates() (line 291 of core/includes/theme.inc).

Steps to reproduce

  1. Install Drupal WXT profile on a new installation
  2. Install the Gin Login module
  3. Clear caches and the error/warning message should appear

Proposed resolution

Update the gin_login_theme() function to have the variables key with the render elements.

Patch to follow.

🐛 Bug report
Status

Fixed

Version

2.0

Component

Code

Created by

🇨🇦Canada phot0x

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024