Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Running run-tests.sh with the --browser
option causes the following exception.
PHP Fatal error: Uncaught exception 'LogicException' with message 'Render context is empty, because render() was called outside of a renderRoot() or renderPlain() call. Use renderPlain()/renderRoot() or #lazy_builder/#pre_render instead.' in /Volumes/devdisk/dev/sites/drupal8alt.dev/core/lib/Drupal/Core/Render/Renderer.php:229
Stack trace:
#0 /Volumes/devdisk/dev/sites/drupal8alt.dev/core/lib/Drupal/Core/Render/Renderer.php(184): Drupal\Core\Render\Renderer->doRender(Array, false)
#1 /Volumes/devdisk/dev/sites/drupal8alt.dev/core/includes/common.inc(1074): Drupal\Core\Render\Renderer->render(Array, false)
#2 /Volumes/devdisk/dev/sites/drupal8alt.dev/core/scripts/run-tests.sh(1207): drupal_render(Array)
#3 /Volumes/devdisk/dev/sites/drupal8alt.dev/core/scripts/run-tests.sh(96): simpletest_script_open_browser()
#4 {main}
thrown in /Volumes/devdisk/dev/sites/drupal8alt.dev/core/lib/Drupal/Core/Render/Renderer.php on line 229
This is due to #2450993: Rendered Cache Metadata created during the main controller request gets lost.
Beta phase evaluation
Issue category | Bug, because of a PHP notice |
---|---|
Issue priority | Normal, because the functionality still works |
Comment | File | Size | Author |
---|---|---|---|
#5 | browser_in-2527486-5.patch | 871 bytes | rocketeerbkw |
d8.run-tests-browser-broken.patch | 928 bytes | alexpott | |
Comments
Comment #1
Wim LeersOops… Sorry about that.
Comment #3
catchCommitted/pushed to 8.0.x, thanks!
Comment #5
rocketeerbkw CreditAttribution: rocketeerbkw commentedThis is still broken
I think you missed a
$render_service->renderPlain
for$js_assets_header
in that patch?Comment #6
dawehnerManual testing worked:
Before
After
Just had a look at the JsCollectionRender and it seems to be that maybe @alexpott has disabled the display of notices on his CLI php config,
because it was a render array at least since 2013.
Comment #7
dawehnerSo it should be RTBC
Comment #8
alexpottYeah this has been emitting errors for me for ages - but it didn't break the page so I was not bothered :) - thanks @rocketeerbkw
Committed e38ae99 and pushed to 8.0.x. Thanks!
Comment #10
alexpott@rocketeerbkw btw a new issue would have been appropriate.