Problem
When a multivalue prop already has content exceeding a limit that is subsequently set (or tightened), the component throws a hard rendering exception instead of handling the violation gracefully. This breaks page rendering entirely for any page containing that component instance.
Error
Drupal\Core\Render\Component\Exception occurred during rendering of component in Page Home (3), field components:
[canvas:price_card/features] There must be a maximum of 3 items in the array, 4 found.
Steps to Reproduce
- Create a code component with a multivalue prop (no limit or higher limit).
- Add content with 4 or more values to a page using that component.
- Remove component.
- Update the component definition to set a maximum of 3 values on that prop.
- Load any page containing the affected component instance.
Expected Behavior
The component should render gracefully by truncating excess values.
Actual Behavior
fatal rendering exception is thrown, preventing the component from rendering.
Issue fork canvas-3587024
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 #3
isholgueras commentedComment #5
tedbowwill review
Comment #6
narendrarIssue is fixed for code components. Moving to Needs Work to address below 2 issues.