- Issue created by @zieder
- 🇫🇷France pdureau Paris
Hello Zieder,
I have alerted Radix team about some errors in their SDC implementation a few months ago: 📌 Feedbacks about SDC components Active
This may be related. Also, a ticket 🐛 Inconsistent `attributes` handling Active may have introduced some more problems since my audit.I have not reproduced your
InvalidArgumentException
issue (but I have found aGetAttrExpression
Twig error somewhere else), can you tell us more about this? Let's try to find the exact root cause of your issue.Anyway, Radix team can use the https://www.drupal.org/project/sdc_devel → module to detect and fix the 317 errors currently found in their SDC components.
Also, I am not excluding we may have some work to do on UI Patterns 2 side once the Radix SDC components are OK. The module was heavily tested during 6 months by many teams in production projects, but it is complex and not bug free. For example, I am surprised to see
@Stephan I somehow couldn't recreate the errors you mentioned on Drupal CMS. I'll try with Drupal 11 Core to see if that's the case. I suspect it might be a content-specific error.
Would be nice to know what error you were getting.
@Pierre still on my todo list to clean up the remaining components, definitely will give the SDC devel a go, thanks a lot for the help.
@Stephan I managed to recreate it with Drupal 11:
TypeError: Drupal\Component\Utility\Html::escape(): Argument #1 ($text) must be of type string, null given, called in /var/www/html/web/core/lib/Drupal/Core/Utility/LinkGenerator.php on line 198 in Drupal\Component\Utility\Html::escape() (line 431 of core/lib/Drupal/Component/Utility/Html.php).
I'll keep you guys posted on a fix.
- 🇫🇷France pdureau Paris
I managed to recreate it with Drupal 11
That's great. I am available if it is somehow related to UI Patterns 2 or SDC.
@Stephan and @Pierre, I looked a bit further into this, and it turns out at least based on the error I am getting this is not a Radix nor UI patterns issue but rather the
D11 core
I suspect.So the error exists on Radix, Olivero, and any other SDC themes, it gets fixed if you just re-save the node.
Stephan, could you check please, and see if that's the case?
- 🇫🇷France pdureau Paris
@doxigo Thanks a lot for you in investigation. Can you tell us more about the root cause on Drupal Core side?
I have no idea Pierre, I haven't looked further into it but you can test on D11, generate some content with devel on let's say olivero, check the content generated and some throw the error. Works after re-saving it though
- 🇯🇴Jordan Rajab Natshah Jordan
Facing the same issue with Drupal 11
✨ Add Exception for TypeError Argument must be String in \Drupal\Component\Utility\Html escape{} Needs work
using the following patch"patches": { "drupal/core": { "Issue #3352384: Add Exception for TypeError Argument must be String in Drupal Component Utility Html escape{}": "https://www.drupal.org/files/issues/2024-11-07/TypeError_htmlspecialchars_ArgumentNustBeTypeString_ArrayGiven-3352384-62.patch" }
Thanks Rajab for the update, I'll mark this as closed for now since it's not Radix related.