Cannot save(Publish) page with just Drupalicon component on it

Created on 8 January 2025, 12 days ago

Overview

Clicking publish on node with just the Drupalicon component on it fails with

AssertionError: assert(str_starts_with($value, '{')) in assert() (line 66 of /Users/ted.bowman/sites/exp-d-core/modules/contrib/experience_builder/src/Plugin/DataType/ComponentPropsValues.php).

#0 /Users/ted.bowman/sites/exp-d-core/modules/contrib/experience_builder/src/Plugin/DataType/ComponentPropsValues.php(66): assert(false, 'assert(str_star...')
#1 /Users/ted.bowman/sites/exp-d-core/core/lib/Drupal/Core/Field/FieldItemBase.php(139): Drupal\experience_builder\Plugin\DataType\ComponentPropsValues->setValue('[]', false)
#2 /Users/ted.bowman/sites/exp-d-core/core/lib/Drupal/Core/TypedData/Plugin/DataType/Map.php(134): Drupal\Core\Field\FieldItemBase->writePropertyValue('props', '[]')
#3 /Users/ted.bowman/sites/exp-d-core/modules/contrib/experience_builder/src/Plugin/Field/FieldType/ComponentTreeItem.php(225): Drupal\Core\TypedData\Plugin\DataType\Map->set('props', '[]', false)
#4 /Users/ted.bowman/sites/exp-d-core/modules/contrib/experience_builder/src/ClientDataToEntityConverter.php(36): Drupal\experience_builder\Plugin\Field\FieldType\ComponentTreeItem->setValue(Array)
#5 /Users/ted.bowman/sites/exp-d-core/modules/contrib/experience_builder/src/Controller/ApiContentUpdateForDemoController.php(36): Drupal\experience_builder\ClientDataToEntityConverter->convert(Array, Object(Drupal\node\Entity\Node))
#6 [internal function]: Drupal\experience_builder\Controller\ApiContentUpdateForDemoController->__invoke(Object(Drupal\node\Entity\Node))
#7 /Users/ted.bowman/sites/exp-d-core/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php(123): call_user_func_array(Object(Drupal\experience_builder\Controller\ApiContentUpdateForDemoController), Array)
#8 /Users/ted.bowman/sites/exp-d-core/core/lib/Drupal/Core/Render/Renderer.php(593): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}()
#9 /Users/ted.bowman/sites/exp-d-core/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php(121): Drupal\Core\Render\Renderer->executeInRenderContext(Object(Drupal\Core\Render\RenderContext), Object(Closure))
#10 /Users/ted.bowman/sites/exp-d-core/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php(97): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->wrapControllerExecutionInRenderContext(Object(Drupal\experience_builder\Controller\ApiContentUpdateForDemoController), Array)

I am not sure but I am guessing this is because it has not props. I am not sure what other components have no props, see πŸ“Œ Update names on xb_test_sdc components to make manual testing easier Active . It is not tested but we could add a test after πŸ“Œ Missing e2e for Publish button hides bugs Active is completed

Proposed resolution

Fix the bug

User interface changes

πŸ› Bug report
Status

Active

Version

0.0

Component

Page builder

Created by

πŸ‡ΊπŸ‡ΈUnited States tedbow Ithaca, NY, USA

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

Merge Requests

Comments & Activities

Production build 0.71.5 2024