Installing UI Patterns 2.0.0 Breaks Site

Created on 27 February 2025, about 2 months ago

Installing UI Patterns 2.0.0 Breaks Site

Installing UI Patterns 2.0.0 breaks the site. The admin section works, but any attempt to load content results in this error:

InvalidArgumentException: The URI '/article-gravis-incassum-plaga' is invalid. You must use a valid URI scheme. in Drupal\Core\Url::fromUri() (line 293 of core/lib/Drupal/Core/Url.php).

Drupal\Core\Template\TwigExtension->getLink() (Line: 132)
__TwigTemplate_3ef54614e566582956af95612bdb1c0b->doDisplay() (Line: 388)
Twig\Template->yield() (Line: 161)
__TwigTemplate_6426467d01b4d82f442dc9b8ef5cdcff->block_nav_items() (Line: 432)
Twig\Template->yieldBlock() (Line: 85)
__TwigTemplate_6426467d01b4d82f442dc9b8ef5cdcff->doDisplay() (Line: 388)
Twig\Template->yield() (Line: 44)
__TwigTemplate_236b15900a44cd08e8e6d88ebebe4ef7->doDisplay() (Line: 388)
Twig\Template->yield() (Line: 344)
Twig\Template->display() (Line: 359)
Twig\Template->render() (Line: 51)
Twig\TemplateWrapper->render() (Line: 33)
twig_render_template() (Line: 348)
Drupal\Core\Theme\ThemeManager->render() (Line: 446)
Drupal\Core\Render\Renderer->doRender() (Line: 203)
Drupal\Core\Render\Renderer->render() (Line: 484)
Drupal\Core\Template\TwigExtension->escapeFilter() (Line: 159)
__TwigTemplate_a642ad3ecb8120d8ed6eb0b9bc6f0505->block_block_content() (Line: 432)
Twig\Template->yieldBlock() (Line: 101)
__TwigTemplate_a642ad3ecb8120d8ed6eb0b9bc6f0505->doDisplay() (Line: 388)
Twig\Template->yield() (Line: 44)
__TwigTemplate_c6986ad651ca03e469a4485331c1fae0->doDisplay() (Line: 388)
Twig\Template->yield() (Line: 344)
Twig\Template->display() (Line: 359)
Twig\Template->render() (Line: 51)
Twig\TemplateWrapper->render() (Line: 33)
twig_render_template() (Line: 348)
Drupal\Core\Theme\ThemeManager->render() (Line: 446)
Drupal\Core\Render\Renderer->doRender() (Line: 459)
Drupal\Core\Render\Renderer->doRender() (Line: 203)
Drupal\Core\Render\Renderer->render() (Line: 484)
.....
.....
And much more

Steps to reproduce

Create fresh install of Drupal 11
Install Devel and generate some Article and Basic Page content
Install Radix 6.0.1
Create subtheme per instructions
View site to insure it is working.
Install UI Patterns 2.0.0 and flush all caches.
Return to site. Error. Admin section works. Go to content, and any page or article you try to load will give an error.

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

🐛 Bug report
Status

Active

Version

6.0

Component

Code

Created by

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • 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 a GetAttrExpression 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.

Production build 0.71.5 2024