Whitescreen in Layout Builder when a data feed icon with argument is attached to a block

Created on 9 February 2025, about 2 months ago

Problem/Motivation

When you configure a data export with a url, say "/node/%node/export.csv", and attach to a block display, that block breaks layout builder with

message: 'Symfony\Component\Routing\Exception\InvalidParameterException: Parameter "node" for route "view.case_studies_block.data_export_1" must match "[^/]++" ("" given) to generate a corresponding URL. in Drupal\Core\Routing\UrlGenerator->doGenerate() (line 202 of /var/www/html/web/core/lib/Drupal/Core/Routing/UrlGenerator.php).'

Steps to reproduce

1. Create an entity reference on a content item, pointing to another content item.
2. Create a block view of that content item, with a contextual filter for the field, and set it to use a default value of "Content ID from URL".
3. Add a data export view display to this view, and give it a Path that includes %node for the contextual filter - e.g. "/node/%node/export.csv".
4. Set the data export "Attach To" field to attach it to the block.
5. Now go to the manage display of the other content type -- the referenced type, and use Layout Builder to add the view block to the display.

You can no longer edit this display, because there isn't a %node value set when you're editing the content type layout itself.

Proposed resolution

Provide an appropriate placeholder value so a link can generate and be valid.

Remaining tasks

User interface changes

API changes

Data model changes

πŸ› Bug report
Status

Active

Version

1.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States freelock Seattle

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

Comments & Activities

Production build 0.71.5 2024