- Issue created by @just_like_good_vibes
- Merge request !281Resolve #3491238 "2.0.0 rc1 normalization of" β (Merged) created by just_like_good_vibes
- π«π·France just_like_good_vibes PARIS
sorry a last error to correct
- πΊπΈUnited States smustgrave
Just want to chime in that this was found while converting component() to include(). In ui_suite_uswds we use nested include() in the page.html.twig and without this fix it's not possible. SO thanks for the quick fix!!
- π«π·France pdureau Paris
With your change, do we lose this logic?
// Twig `is sequence` and `is mapping `tests are not useful when a list // of renderables has mapping keys (non consecutive, strings) instead of // sequence (integer, consecutive) keys. For example a list of blocks // from page layout or layout builder: each block is keyed by its UUID. // So, transform this list of renderables to a proper Twig sequence. return array_values($value);
I don't see the
array_values
equivalent in:$value = array_map(static fn($item) => self::normalize($item), $value); return (count($value) === 1) ? reset($value) : $value;
- π«π·France just_like_good_vibes PARIS
Hello,
array_map is always loosing keys, so yes the logic is kept.
i will add a test for that - π«π·France just_like_good_vibes PARIS
i added another check just for you :)
-
pdureau β
committed afe7b3bd on 2.0.x authored by
just_like_good_vibes β
Issue #3491238 by just_like_good_vibes, smustgrave: Normalization of...
-
pdureau β
committed afe7b3bd on 2.0.x authored by
just_like_good_vibes β
- π«π·France Grimreaper France π«π·
Hi,
Thanks for the additional fixes, ok for me.
- Merge request !287Issue #3491238 by just_like_good_vibes, smustgrave: Normalization of slots triggers some unwanted filtering β (Merged) created by just_like_good_vibes
-
just_like_good_vibes β
committed 37c8dd09 on 2.0.x
Issue #3491238 by just_like_good_vibes, smustgrave: Normalization of...
-
just_like_good_vibes β
committed 37c8dd09 on 2.0.x
- π«π·France Grimreaper France π«π·
Hi,
I think there is still a remaining case not handled.
With UI Suite Bootstrap 5.1.x, UI Patterns 2.0.x and Drupal Commerce, on user/1/address-book, I have:
Drupal\Core\Render\Component\Exception\InvalidComponentException: [items[1].title] Object value found, but a string is required in Drupal\Core\Theme\Component\ComponentValidator->validateProps() (line 203 of core/lib/Drupal/Core/Theme/Component/ComponentValidator.php).
So I tried in app/modules/contrib/ui_patterns/src/Plugin/UiPatterns/PropType/LinksPropType.php::normalizeTitle() to add:
elseif ($title instanceof FormattableMarkup) { $title = $title->render(); }
Then another case when $title is a renderable array.
- π«π·France just_like_good_vibes PARIS
hello,
this belongs to another ticket, because it is linkproptype normalization and not slot - π«π·France steveoriol Grenoble π«π·
With UI Suite DaisyUI, UI Patterns 2.0.x and Drupal Commerce (on user/1/address-book) ou Webform (on user/1/submissions) ...
Same error as grimreaper - π«π·France just_like_good_vibes PARIS
see π LinkPropType normalization...suite Active , we stay closed this issue and work in a new clean one.