Null node url causes error with Mercury editor

Created on 6 February 2025, 18 days ago

Mercury editor seems to want to use the node component with a null url when creating a new node, which throws this error:

Drupal\Core\Render\Component\Exception\InvalidComponentException: [radix:node/url] NULL value found, but a string or an object is required. This may be because the property is empty instead of having data present. If possible fix the source data, use the |default() twig filter, or update the schema to allow multiple types.. in Drupal\Core\Theme\Component\ComponentValidator->validateProps() (line 231 of core/lib/Drupal/Core/Theme/Component/ComponentValidator.php).
Drupal\Core\Template\ComponentsTwigExtension->doValidateProps(Array, 'radix:node') (Line: 103)
Drupal\Core\Template\ComponentsTwigExtension->validateProps(Array, 'radix:node') (Line: 52)
__TwigTemplate_7fc0b1d16278149db9a03fba125f085c->doDisplay(Array, Array) (Line: 388)
Twig\Template->yield(Array) (Line: 44)
__TwigTemplate_3abd9628e8934a9f17e1ae6697ceebca->doDisplay(Array, Array) (Line: 388)
Twig\Template->yield(Array, Array) (Line: 344)
Twig\Template->display(Array) (Line: 359)
Twig\Template->render(Array) (Line: 51)
Twig\TemplateWrapper->render(Array) (Line: 33)
twig_render_template('themes/custom/thruway_radix/templates/content/node.html.twig', Array) (Line: 348)

This is resolved by changing the url property's type from string to ['string', 'null'] in node.component.yml

Patch to follow.

πŸ› Bug report
Status

Active

Version

6.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States ransomweaver

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

Comments & Activities

Production build 0.71.5 2024