- Issue created by @kiwad
- ๐ฎ๐ณIndia arunsahijpal
Hi @kiwad,
I've installed the experience builder on drupal cms project but I didn't get any error. - ๐ง๐ชBelgium wim leers Ghent ๐ง๐ช๐ช๐บ
The version in the issue summary is ancient ๐
Without concrete steps to reproduce on the latest release of XB this is not actionable Iโm afraid ๐
- Status changed to Closed: cannot reproduce
about 1 month ago 7:06am 20 June 2025 - ๐ญ๐บHungary nevergone Nyรญregyhรกza, Hungary, Europe
Steps to reproduce:
PHP 8.3.6, Composer 8.3.6
- Download latest Drupal (11.2.2):
composer create-project drupal/recommended-project .
- Install Drush (optional):
composer require drush/drush
- Install Drupal 11.2.2 with Standard profile:
drush si standard
- Install latest Experience Builder (0.5.0-alpha1):
composer require 'drupal/experience_builder:^0.5@alpha'
- Download latest Radix theme (6.0.2):
composer require 'drupal/radix:^6.0'
- Visit /admin/appearance form, install and set as default Radix theme
- Go to /admin/modules page and enable Experience Builder module
- Download latest Drupal (11.2.2):
- ๐ณ๐ฑNetherlands balintbrews Amsterdam, NL
I took a quick look at the SDCs in the Radix theme, and I spotted something that might cause this. It's just a guess.
Here are three SDCs that have props with an
enum
attribute and theirtype
defined as an array:My guess is that
\Drupal\experience_builder\JsonSchemaInterpreter
is not expectingtype
as an array, or at least it's not expecting it when there is anenum
attribute. - ๐ญ๐บHungary nevergone Nyรญregyhรกza, Hungary, Europe
Radix 6.0.2 SDC components:
Wrong:
- accordion
- badge
- block
- breadcrumb
- button
- button-group
- card
- comment
- details
- dropdown
- field
- field-comment
- fieldset
- figure
- form-element
- form-element--label
- form-element--radiocheckbox
- heading
- list-group
- media
- modal
- nav-item
- node
- offcanvas
- page
- page-footer
- page-title
- select
- spinner
- taxonomy
- toasts
- views-view
Ok:
- alert
- close-button
- collapse
- dropdown-menu
- form
- html
- input
- local-tasks
- nav
- navbar
- navbar-brand
- page-navigation
- pagination
- progress
- radios
- region
- table
- textarea
- tooltips
- user
- views-view--grid
- views-view--table
- views-view--unformatted
- ๐ช๐ธSpain penyaskito Seville ๐, Spain ๐ช๐ธ, UTC+2 ๐ช๐บ
Related to โจ How to pass content_attributes to SDC without it being shown in the XB UI Active (probably even duplicated)
- ๐ณ๐ฑNetherlands balintbrews Amsterdam, NL
So probably any SDC is problematic where a prop's
type
is an array. This, as I come to think about it more, may not be very surprising: XB's prop shape matching needs to result in a deterministic field type + settings, and a field widget. Allowing multiple types would require us to generate UI that allows the user to select the type first. But I'm getting out of my depth, so curious what @wim leers or @penyaskito say. ๐ - ๐ช๐ธSpain penyaskito Seville ๐, Spain ๐ช๐ธ, UTC+2 ๐ช๐บ
AFAIK
array
is supported, as far asitems
specify the type.See
\Drupal\experience_builder\PropShape\PropShape::resolveSchemaReferences
Not that sure when using several types (e.g.
type:[string, array]
for a prop - ๐ณ๐ฑNetherlands balintbrews Amsterdam, NL
Updated the issue summary based on what we know so far. I think what I said in #7 should be ignored based on the subsequent comments and a quick testing I did.
- ๐ง๐ชBelgium wim leers Ghent ๐ง๐ช๐ช๐บ
It needs more investigation to figure what exactly causes this error.
The answer is AFAICT surprisingly simple: it's not valid JSON Schema! SDC uses a superset โ see @e0ipso's comment at #3352063-14: Allow schema references in Single Directory Component prop schemas โ .
The solution is โจ How to pass content_attributes to SDC without it being shown in the XB UI Active , so marking this as a duplicate and tagged that as a beta blocker + contributed project blocker.