PHP Fatal error: Uncaught ValueError: "" is not a valid backing value for enum Drupal\experience_builder\SdcPropJsonSchemaType

Created on 28 August 2024, 21 days ago
Updated 12 September 2024, 6 days ago

Problem/Motivation

Update to latest 0.x for experience_builder (while having themes enabled) and get the following when clearing cache:

kristens-mbp-2:experience_builder kristenpol$ ddcr
PHP Fatal error:  Uncaught ValueError: "" is not a valid backing value for enum Drupal\experience_builder\SdcPropJsonSchemaType in /var/www/html/web/modules/contrib/experience_builder/src/PropShape.php:130
Stack trace:
#0 /var/www/html/web/modules/contrib/experience_builder/src/PropShape.php(130): Drupal\experience_builder\SdcPropJsonSchemaType::from()
#1 /var/www/html/web/modules/contrib/experience_builder/src/PropShape.php(39): Drupal\experience_builder\PropShape::normalizePropSchema()
#2 /var/www/html/web/modules/contrib/experience_builder/src/PropShape.php(100): Drupal\experience_builder\PropShape::normalize()
#3 /var/www/html/web/modules/contrib/experience_builder/src/Plugin/ComponentPluginManager.php(88): Drupal\experience_builder\PropShape::getComponentPropsForMetadata()
#4 /var/www/html/web/modules/contrib/experience_builder/src/Plugin/ComponentPluginManager.php(78): Drupal\experience_builder\Plugin\ComponentPluginManager::propHasStorablePropShape()
#5 /var/www/html/web/modules/contrib/experience_builder/src/Plugin/ComponentPluginManager.php(37): Drupal\experience_builder\Plugin\ComponentPluginManager::componentMeetsRequirements()
#6 /var/www/html/web/core/lib/Drupal/Core/Plugin/DefaultPluginManager.php(214): Drupal\experience_builder\Plugin\ComponentPluginManager->setCachedDefinitions()
#7 /var/www/html/web/modules/contrib/experience_builder/experience_builder.module(412): Drupal\Core\Plugin\DefaultPluginManager->getDefinitions()
#8 [internal function]: experience_builder_rebuild()
#9 /var/www/html/web/core/lib/Drupal/Core/Extension/ModuleHandler.php(416): call_user_func_array()
#10 /var/www/html/web/core/lib/Drupal/Core/Extension/ModuleHandler.php(395): Drupal\Core\Extension\ModuleHandler->Drupal\Core\Extension\{closure}()
#11 /var/www/html/web/core/lib/Drupal/Core/Extension/ModuleHandler.php(415): Drupal\Core\Extension\ModuleHandler->invokeAllWith()
#12 /var/www/html/web/core/includes/common.inc(477): Drupal\Core\Extension\ModuleHandler->invokeAll()
#13 /var/www/html/web/core/includes/utility.inc(41): drupal_flush_all_caches()
#14 /var/www/html/vendor/drush/drush/src/Commands/core/CacheRebuildCommands.php(60): drupal_rebuild()
#15 [internal function]: Drush\Commands\core\CacheRebuildCommands->rebuild()
#16 /var/www/html/vendor/consolidation/annotated-command/src/CommandProcessor.php(276): call_user_func_array()
#17 /var/www/html/vendor/consolidation/annotated-command/src/CommandProcessor.php(212): Consolidation\AnnotatedCommand\CommandProcessor->runCommandCallback()
#18 /var/www/html/vendor/consolidation/annotated-command/src/CommandProcessor.php(175): Consolidation\AnnotatedCommand\CommandProcessor->validateRunAndAlter()
#19 /var/www/html/vendor/consolidation/annotated-command/src/AnnotatedCommand.php(387): Consolidation\AnnotatedCommand\CommandProcessor->process()
#20 /var/www/html/vendor/symfony/console/Command/Command.php(326): Consolidation\AnnotatedCommand\AnnotatedCommand->execute()
#21 /var/www/html/vendor/symfony/console/Application.php(1096): Symfony\Component\Console\Command\Command->run()
#22 /var/www/html/vendor/symfony/console/Application.php(324): Symfony\Component\Console\Application->doRunCommand()
#23 /var/www/html/vendor/symfony/console/Application.php(175): Symfony\Component\Console\Application->doRun()
#24 /var/www/html/vendor/drush/drush/src/Runtime/Runtime.php(110): Symfony\Component\Console\Application->run()
#25 /var/www/html/vendor/drush/drush/src/Runtime/Runtime.php(40): Drush\Runtime\Runtime->doRun()
#26 /var/www/html/vendor/drush/drush/drush.php(139): Drush\Runtime\Runtime->run()
#27 /var/www/html/vendor/drush/drush/drush(4): require('...')
#28 /var/www/html/vendor/bin/drush(119): include('...')
#29 {main}
  thrown in /var/www/html/web/modules/contrib/experience_builder/src/PropShape.php on line 130

Fatal error: Uncaught ValueError: "" is not a valid backing value for enum Drupal\experience_builder\SdcPropJsonSchemaType in /var/www/html/web/modules/contrib/experience_builder/src/PropShape.php:130
Stack trace:
#0 /var/www/html/web/modules/contrib/experience_builder/src/PropShape.php(130): Drupal\experience_builder\SdcPropJsonSchemaType::from()
#1 /var/www/html/web/modules/contrib/experience_builder/src/PropShape.php(39): Drupal\experience_builder\PropShape::normalizePropSchema()
#2 /var/www/html/web/modules/contrib/experience_builder/src/PropShape.php(100): Drupal\experience_builder\PropShape::normalize()
#3 /var/www/html/web/modules/contrib/experience_builder/src/Plugin/ComponentPluginManager.php(88): Drupal\experience_builder\PropShape::getComponentPropsForMetadata()
#4 /var/www/html/web/modules/contrib/experience_builder/src/Plugin/ComponentPluginManager.php(78): Drupal\experience_builder\Plugin\ComponentPluginManager::propHasStorablePropShape()
#5 /var/www/html/web/modules/contrib/experience_builder/src/Plugin/ComponentPluginManager.php(37): Drupal\experience_builder\Plugin\ComponentPluginManager::componentMeetsRequirements()
#6 /var/www/html/web/core/lib/Drupal/Core/Plugin/DefaultPluginManager.php(214): Drupal\experience_builder\Plugin\ComponentPluginManager->setCachedDefinitions()
#7 /var/www/html/web/modules/contrib/experience_builder/experience_builder.module(412): Drupal\Core\Plugin\DefaultPluginManager->getDefinitions()
#8 [internal function]: experience_builder_rebuild()
#9 /var/www/html/web/core/lib/Drupal/Core/Extension/ModuleHandler.php(416): call_user_func_array()
#10 /var/www/html/web/core/lib/Drupal/Core/Extension/ModuleHandler.php(395): Drupal\Core\Extension\ModuleHandler->Drupal\Core\Extension\{closure}()
#11 /var/www/html/web/core/lib/Drupal/Core/Extension/ModuleHandler.php(415): Drupal\Core\Extension\ModuleHandler->invokeAllWith()
#12 /var/www/html/web/core/includes/common.inc(477): Drupal\Core\Extension\ModuleHandler->invokeAll()
#13 /var/www/html/web/core/includes/utility.inc(41): drupal_flush_all_caches()
#14 /var/www/html/vendor/drush/drush/src/Commands/core/CacheRebuildCommands.php(60): drupal_rebuild()
#15 [internal function]: Drush\Commands\core\CacheRebuildCommands->rebuild()
#16 /var/www/html/vendor/consolidation/annotated-command/src/CommandProcessor.php(276): call_user_func_array()
#17 /var/www/html/vendor/consolidation/annotated-command/src/CommandProcessor.php(212): Consolidation\AnnotatedCommand\CommandProcessor->runCommandCallback()
#18 /var/www/html/vendor/consolidation/annotated-command/src/CommandProcessor.php(175): Consolidation\AnnotatedCommand\CommandProcessor->validateRunAndAlter()
#19 /var/www/html/vendor/consolidation/annotated-command/src/AnnotatedCommand.php(387): Consolidation\AnnotatedCommand\CommandProcessor->process()
#20 /var/www/html/vendor/symfony/console/Command/Command.php(326): Consolidation\AnnotatedCommand\AnnotatedCommand->execute()
#21 /var/www/html/vendor/symfony/console/Application.php(1096): Symfony\Component\Console\Command\Command->run()
#22 /var/www/html/vendor/symfony/console/Application.php(324): Symfony\Component\Console\Application->doRunCommand()
#23 /var/www/html/vendor/symfony/console/Application.php(175): Symfony\Component\Console\Application->doRun()
#24 /var/www/html/vendor/drush/drush/src/Runtime/Runtime.php(110): Symfony\Component\Console\Application->run()
#25 /var/www/html/vendor/drush/drush/src/Runtime/Runtime.php(40): Drush\Runtime\Runtime->doRun()
#26 /var/www/html/vendor/drush/drush/drush.php(139): Drush\Runtime\Runtime->run()
#27 /var/www/html/vendor/drush/drush/drush(4): require('...')
#28 /var/www/html/vendor/bin/drush(119): include('...')
#29 {main}
  thrown in /var/www/html/web/modules/contrib/experience_builder/src/PropShape.php on line 130
 [warning] Drush command terminated abnormally.
Failed to run drush cr: exit status 1

Steps to reproduce

Proposed resolution

Debug and fix :)

Remaining tasks

Debug and fix :)

User interface changes

API changes

Data model changes

🐛 Bug report
Status

Fixed

Version

1.0

Component

Code

Created by

🇺🇸United States Kristen Pol Santa Cruz, CA, USA

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

Comments & Activities

  • Issue created by @Kristen Pol
  • 🇮🇳India MadhukarKrishnachary

    I found the same error when I tried to install XB with a d10.3 instance and SDDS project. However, I could further access the /xb/node/1 and the default components from the XB are shown. I get the same error as @kristen mentioned above. I'm attaching screenshot for reference. Thanks

  • Issue was unassigned.
  • Status changed to Fixed 20 days ago
  • 🇺🇸United States Kristen Pol Santa Cruz, CA, USA

    Fixed for now by commenting out empty objects:

     
    -    link:
    -      type: object
    -      title: Link
    -      description: 'Link object:'
    -      properties: {}
    +    # link:
    +    #   type: object
    +    #   title: Link
    +    #   description: 'Link object:'
    +    #   properties: {}
     
     
    -    image:
    -      type: object
    -      title: Image
    -      description: 'Image object:'
    -      properties: {}
    +    # image:
    +    #   type: object
    +    #   title: Image
    +    #   description: 'Image object:'
    +    #   properties: {}
    
    

    Follow-up issue:

    🐛 Schema issues in SDDS now that schema is defined Active

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

Production build 0.71.5 2024