- Issue created by @Grimreaper
- Merge request !11894Issue #3520242 by grimreaper: Incorrect render structure in Navigation PageContext β (Closed) created by Grimreaper
- π«π·France pdureau Paris
Good catch. The child component was positioned as a render child:
[ '#type' => 'component', '#component' => 'navigation:title', 0 => [ '#type' => 'component', '#component' => 'navigation:title', ] ]
Inside of side by side:
[ '#type' => 'component', '#component' => 'navigation:title', ], [ '#type' => 'component', '#component' => 'navigation:title', ]
- πΊπΈUnited States nicxvan
I'm not sure this is the place for it, but is there somewhere we can make this more robust to prevent this issue in the future?
- π«π·France pdureau Paris
I'm not sure this is the place for it, but is there somewhere we can make this more robust to prevent this issue in the future?
In https://www.drupal.org/project/drupal/issues/3494634#comment-16074642 π Compatibility between SDC and the Form API Active I am asking
Is it the opportunity to deprecate
#slots
and to promote render children as the expected way of settings slots in SDC ?This may make this more robust, because a numeric slot will be caught as invalid.
- πΊπΈUnited States nicxvan
That might be the long term fix, I meant something more short term, like throwing an error if numeric keys are found.
- π«π·France pdureau Paris
That might be the long term fix, I meant something more short term, like throwing an error if numeric keys are found.
Interesting. I have created a dedicated issue: π What do we do with numeric render children keys? Active
- π¦πΊAustralia larowlan π¦πΊπ.au GMT+10
The long term fix would be in \Drupal\Core\Render\Element::children - we already check for int there, so we could introduce a deprecation error in 11.x and start throwing an exception in 12
-
larowlan β
committed 2510e438 on 11.x
Issue #3520242 by grimreaper, pdureau: Incorrect render structure in...
-
larowlan β
committed 2510e438 on 11.x