Issue when a component doesn't have properties

Created on 21 March 2024, 3 months ago

Hi,

Firstly, I would like to say thanks for building this module.

I'm doing some experiment to create components, then in Layout Builder, I create a SDC block for components, and I run into an issue when my components don't have any properties.

My component is just a black box with paddings and a opacity background, users can input content. So, I think this component doesn't need any properties, I just created a content slot. This is the error log

#0 /app/vendor/e0ipso/shaper/src/Transformation/TransformationTransformerTrait.php(30): Shaper\Transformation\TransformationBase->Shaper\Transformation\{closure}('Adaptor {class}...')
#1 /app/web/modules/contrib/cl_editorial/src/Form/ComponentInputToForm.php(62): Shaper\Transformation\TransformationBase->transform(Object(stdClass), Object(Shaper\Util\Context))
#2 /app/web/modules/contrib/sdc_block/src/Plugin/Block/ComponentBlock.php(149): Drupal\cl_editorial\Form\ComponentInputToForm->buildForm('pww_mdwfp_theme...', Array, Array, Object(Drupal\Core\Form\SubformState))
#3 /app/web/core/lib/Drupal/Core/Block/BlockPluginTrait.php(202): Drupal\sdc_block\Plugin\Block\ComponentBlock->blockForm(Array, Object(Drupal\Core\Form\SubformState))
#4 /app/web/core/lib/Drupal/Core/Block/BlockBase.php(35): Drupal\Core\Block\BlockBase->traitBuildConfigurationForm(Array, Object(Drupal\Core\Form\SubformState))

I created a patch for this issue. Could you review if this patch is good?

πŸ› Bug report
Status

Active

Version

2.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States sea2709 Texas

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

Comments & Activities

Production build 0.69.0 2024