Problem/Motivation

I tried installing the latest stable version of UI Patterns (2.0.2 at the time of writing) on the latest stable version of Drupal CMS (1.1.0 at the time of writing).

As soon as I enable the UI Patterns module, the site returns an error and becomes inaccessible. I had to disable the module with Drush in order to restore the site to working order.

There appears to be an incompatibility with the syntax/declaration of SDC components bundled with Experience Builder.

Steps to reproduce

  1. Install Drupal CMS
  2. Install UI Patterns 2

I am using DDEV, and following a clean installation of Drupal CMS 1.1.0, I installed and enabled UI Patterns 2.

The site then returns the following error:

The website encountered an unexpected error. Try again later.

JsonSchema\Exception\ResourceNotFoundException: file_get_contents(json-schema-definitions://experience_builder.module/image): Failed to open stream: No such file or directory in JsonSchema\Uri\Retrievers\FileGetContents->retrieve() (line 38 of /var/www/html/vendor/justinrainbow/json-schema/src/JsonSchema/Uri/Retrievers/FileGetContents.php).

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

zee86 created an issue. See original summary.

just_like_good_vibes’s picture

Assigned: Unassigned » just_like_good_vibes

Hello,
we will check this,
thank you for reporting.

just_like_good_vibes’s picture

Hello again,
i have made the test and yes.
Clearly the problem is coming from drupal_cms_olivero which is referencing "experience_builder" in its SDC definition.

A lot of components are concerned : card, paragraph, testimonial, feature, hero..

here is the full trace on my install

The website encountered an unexpected error. Try again later.

JsonSchema\Exception\ResourceNotFoundException: file_get_contents(json-schema-definitions://experience_builder.module/image): Failed to open stream: No such file or directory in JsonSchema\Uri\Retrievers\FileGetContents->retrieve() (line 38 of /var/www/html/vendor/justinrainbow/json-schema/src/JsonSchema/Uri/Retrievers/FileGetContents.php).

JsonSchema\Uri\UriRetriever->loadSchema() (Line: 181)
JsonSchema\Uri\UriRetriever->retrieve() (Line: 52)
JsonSchema\SchemaStorage->addSchema() (Line: 115)
JsonSchema\SchemaStorage->getSchema() (Line: 138)
JsonSchema\SchemaStorage->resolveRef() (Line: 162)
JsonSchema\SchemaStorage->resolveRefSchema() (Line: 31)
Drupal\ui_patterns\SchemaManager\ReferencesResolver->resolve() (Line: 246)
Drupal\ui_patterns\ComponentPluginManager->annotateProp() (Line: 231)
Drupal\ui_patterns\ComponentPluginManager->annotateProps() (Line: 161)
Drupal\ui_patterns\ComponentPluginManager->alterDefinition()
array_map() (Line: 242)
Drupal\Core\Theme\ComponentPluginManager->alterDefinitions() (Line: 341)
Drupal\Core\Plugin\DefaultPluginManager->findDefinitions() (Line: 321)
Drupal\ui_patterns\ComponentPluginManager->findDefinitions() (Line: 213)
Drupal\Core\Plugin\DefaultPluginManager->getDefinitions() (Line: 134)
Drupal\Core\Theme\ComponentPluginManager->find() (Line: 73)
Drupal\Core\Template\Loader\ComponentLoader->exists() (Line: 100)
Twig\Loader\ChainLoader->getCacheKey() (Line: 318)
Twig\Environment->getTemplateClass() (Line: 204)
Drupal\Core\Template\TwigEnvironment->getTemplateClass() (Line: 296)
Twig\Template->loadTemplate() (Line: 54)
__TwigTemplate_6c14f1eef299f2f3809ad0c3fca020e7->doDisplay() (Line: 388)
Twig\Template->yield() (Line: 64)
__TwigTemplate_5d6f3398ef26ce387a50b8d23c021440->doDisplay() (Line: 388)
Twig\Template->yield() (Line: 68)
__TwigTemplate_0ac52a8eecb896edfa663d5786a718fc->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: 459)
Drupal\Core\Render\Renderer->doRender() (Line: 203)
Drupal\Core\Render\Renderer->render() (Line: 484)
Drupal\Core\Template\TwigExtension->escapeFilter() (Line: 94)
__TwigTemplate_0e31e843b5da39bfd546c4ab4d41b777->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: 158)
Drupal\Core\Render\MainContent\HtmlRenderer->Drupal\Core\Render\MainContent\{closure}() (Line: 593)
Drupal\Core\Render\Renderer->executeInRenderContext() (Line: 153)
Drupal\Core\Render\MainContent\HtmlRenderer->renderResponse() (Line: 90)
Drupal\Core\EventSubscriber\MainContentViewSubscriber->onViewRenderArray() (Line: 246)
Symfony\Component\EventDispatcher\EventDispatcher::Symfony\Component\EventDispatcher\{closure}() (Line: 206)
Symfony\Component\EventDispatcher\EventDispatcher->callListeners() (Line: 56)
Symfony\Component\EventDispatcher\EventDispatcher->dispatch() (Line: 188)
Symfony\Component\HttpKernel\HttpKernel->handleRaw() (Line: 76)
Symfony\Component\HttpKernel\HttpKernel->handle() (Line: 53)
Drupal\Core\StackMiddleware\Session->handle() (Line: 48)
Drupal\Core\StackMiddleware\KernelPreHandle->handle() (Line: 28)
Drupal\Core\StackMiddleware\ContentLength->handle() (Line: 32)
Drupal\big_pipe\StackMiddleware\ContentLength->handle() (Line: 116)
Drupal\page_cache\StackMiddleware\PageCache->pass() (Line: 90)
Drupal\page_cache\StackMiddleware\PageCache->handle() (Line: 48)
Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle() (Line: 51)
Drupal\Core\StackMiddleware\NegotiationMiddleware->handle() (Line: 36)
Drupal\Core\StackMiddleware\AjaxPageState->handle() (Line: 51)
Drupal\Core\StackMiddleware\StackedHttpKernel->handle() (Line: 709)
Drupal\Core\DrupalKernel->handle() (Line: 19)
just_like_good_vibes’s picture

Status: Active » Needs work

We will propose something to cope with those errors before a proper fix is proposed at the right place, i mean in the drupal_cms_olivero SDC component definitions... stay tuned, it will come quickly.

i am surprised of those mistakes in the component definitions of the contrib theme drupal_cms_olivero, we will fill an issue if not already done to help them correct.

just_like_good_vibes’s picture

Assigned: just_like_good_vibes » pdureau
Status: Needs work » Needs review

ok, ready for review

just_like_good_vibes’s picture

Title: Site error when enabled on Drupal CMS » [2.0.3] Cope with invalid json schema references in SDC components (Site error when enabled on Drupal CMS)
pdureau’s picture

Assigned: pdureau » just_like_good_vibes
Status: Needs review » Reviewed & tested by the community

Review OK

But PHPCS fix to do.

I will create the drupal_cms_olivero issue, because the real problem is on their side.

just_like_good_vibes’s picture

Assigned: just_like_good_vibes » Unassigned
Status: Reviewed & tested by the community » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.