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
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | geocoder-help_page_php_errors-3574845-2.patch | 249 bytes | velmir_taky |
Issue fork geocoder-3574845
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 #2
velmir_taky commentedThe 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:
Before patch: Two PHP warnings on rendering geocoder_help theme.
After patch: Template renders cleanly (1185 bytes), zero warnings.
Comment #4
solideogloria commentedConfirmed the fix works.
Comment #6
itamair commentedSet to Auto Merge ... thanks!