Closed (fixed)
Project:
UI Patterns (SDC in Drupal UI)
Version:
2.0.0-rc1
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
25 Dec 2024 at 17:51 UTC
Updated:
10 Jan 2025 at 11:39 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
just_like_good_vibesplease add more details to the usecase, not very clear how to reproduce :)
Comment #3
just_like_good_vibesComment #4
grimreaper- Install the standard installation profile
- use a UI Suite theme, like ui_suite_bootstrap (5.1.x)
- in manage display of the article content type, enable Layout Builder on the view mode full
- in Layout Builder add a section from a component, like grid_row_1
- in this section, place the "block" to display the comments field
- keep default settings of the comment field formatter
- save
- error on display
Comment #5
grimreaperComment #6
pdureau commentedComment #7
just_like_good_vibesThis is an horrible SDC bug...
there is a complex render array generated by the comments block, without any comments.
At a certain depth in the render array, there an an empty array as the value of key "comments".
empty arrays are not considered render arrays, and the whole array structure is then considered not being a render array,
and SDC fails with WSOD.
i propose to create a workaround for that case in ui_patterns, but that's clearly not our role.
We will help users, to keep protected from SDC being too strict :(
Comment #8
just_like_good_vibesor maybe just a core bug...
see
Drupal\Core\Render\Element::isRenderArraycalled fromComponentElement::generateComponentTemplate, line 112. the lineElement::isRenderArray($slot_value)is generating the error.Comment #10
just_like_good_vibeshere we go :) normalization of slot, a new add-on. Stronger than before :D
Comment #11
grimreaperThanks, it works now!
Comment #12
just_like_good_vibescoool :)
Comment #14
just_like_good_vibes