Problem/Motivation

Warning: Undefined array key "render element" in Drupal\Core\Theme\ThemeManager->render() (line 202 of core/lib/Drupal/Core/Theme/ThemeManager.php).
Drupal\Core\Theme\ThemeManager->render() (Line: 490)
Drupal\Core\Render\Renderer->doRender() (Line: 248)
Drupal\Core\Render\Renderer->render() (Line: 41)
geocoder_help()
call_user_func_array() (Line: 407)
Drupal\Core\Extension\ModuleHandler->invoke() (Line: 173)
Drupal\help\Controller\HelpController->helpPage()
call_user_func_array() (Line: 123)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() (Line: 637)
Drupal\Core\Render\Renderer->executeInRenderContext() (Line: 121)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->wrapControllerExecutionInRenderContext() (Line: 97)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() (Line: 181)
Symfony\Component\HttpKernel\HttpKernel->handleRaw() (Line: 76)
Symfony\Component\HttpKernel\HttpKernel->handle() (Line: 53)
Drupal\Core\StackMiddleware\Session->handle() (Line: 48)
Drupal\Core\StackMiddleware\KernelPreHandle->handle() (Line: 28)
Drupal\Core\StackMiddleware\ContentLength->handle() (Line: 32)
Drupal\big_pipe\StackMiddleware\ContentLength->handle() (Line: 48)
Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle() (Line: 51)
Drupal\Core\StackMiddleware\NegotiationMiddleware->handle() (Line: 36)
Drupal\Core\StackMiddleware\AjaxPageState->handle() (Line: 51)
Drupal\Core\StackMiddleware\StackedHttpKernel->handle() (Line: 741)
Drupal\Core\DrupalKernel->handle() (Line: 19)

Steps to reproduce

Visit /admin/help/geocoder

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

Issue fork geocoder-3574845

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

solideogloria created an issue. See original summary.

velmir_taky’s picture

Status: Active » Needs review
StatusFileSize
new249 bytes

The geocoder_help theme hook definition in geocoder_theme() is missing the variables key. When neither variables nor render element is defined, Drupal's ThemeManager::render() throws:

Warning: Undefined array key "render element" ThemeManager.php:208
Warning: Undefined array key "render element" ThemeManager.php:210

The fix adds 'variables' => [] to the theme hook definition, since help.html.twig is static HTML with no variables.

Tested on:

  • - PHP 8.4.18
  • - Drupal 11 (fresh install, Docker)
  • - Geocoder 8.x-4.30
  • - Patch applied via cweagans/composer-patches

Before patch: Two PHP warnings on rendering geocoder_help theme.
After patch: Template renders cleanly (1185 bytes), zero warnings.

solideogloria’s picture

Status: Needs review » Reviewed & tested by the community

Confirmed the fix works.

itamair made their first commit to this issue’s fork.

itamair’s picture

Status: Reviewed & tested by the community » Fixed

Set to Auto Merge ... thanks!

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.

  • itamair committed 8495e5f2 on 8.x-4.x authored by velmir_taky
    [#3574845] fix: Add missing variables key to geocoder_help theme hook
    

Status: Fixed » Closed (fixed)

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