A component can break XB just by failing to render its preview

Created on 14 August 2025, 28 days ago

Overview

STR:
Using drupal_cms:2.x 10bc418

  • Install site.
  • Install blog recipe.
  • Edit your homepage.

XB breaks because of

{{ include ('mercury:view-snap', { rows: rows }) }}

in web/themes/contrib/mercury/components/templates/blog/views-view--blog--latest.html.twig

That component defines rows as a string prop, but I'm guessing it gets something else.

Then it fails with

AssertionError: Bubbling failed. in assert() (line 628 of core/lib/Drupal/Core/Render/Renderer.php).

Drupal\Core\Render\Renderer->executeInRenderContext() (Line: 59)
Drupal\experience_builder\Element\RenderSafeComponentContainer->renderComponent()
call_user_func_array() (Line: 107)
Drupal\Core\Render\Renderer->doTrustedCallback() (Line: 876)
Drupal\Core\Render\Renderer->doCallback() (Line: 438)
Drupal\Core\Render\Renderer->doRender() (Line: 510)
Drupal\Core\Render\Renderer->doRender() (Line: 510)
Drupal\Core\Render\Renderer->doRender() (Line: 227)
Drupal\Core\Render\Renderer->render() (Line: 491)
Drupal\Core\Template\TwigExtension->escapeFilter() (Line: 73)
__TwigTemplate_38ad9cf0bf6c64bd7a56070481cc3409->doDisplay() (Line: 402)

The original exception is:

JsonSchema\Exception\InvalidArgumentException occurred during rendering of component d6c15114-fd97-4e8d-b451-2efa4ac85a58 in Preview rendering component Blog: Latest blog posts.: Unable to encode schema array as JSON: Recursion detected

Proposed resolution

This issue is not about fixing the component, but a faulty component shouldn't crash XB.
We have added lots of robustness here, but maybe we are still missing something?

User interface changes

XB doesn't break, just skip a preview?

πŸ› Bug report
Status

Active

Version

1.0

Component

… to be triaged

Created by

πŸ‡ͺπŸ‡ΈSpain penyaskito Seville πŸ’ƒ, Spain πŸ‡ͺπŸ‡Έ, UTC+2 πŸ‡ͺπŸ‡Ί

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

Comments & Activities

Production build 0.71.5 2024