I get WOSD after enabling the examples sub module with following error output:

The website encountered an unexpected error. Please try again later.
Error: Call to undefined method Drupal\Core\Config\Schema\Undefined::getIterator() in Drupal\Core\Entity\Plugin\DataType\ConfigEntityAdapter->getIterator() (line 74 of core/lib/Drupal/Core/Entity/Plugin/DataType/ConfigEntityAdapter.php).

Drupal\Core\Entity\Plugin\DataType\ConfigEntityAdapter->getIterator() (Line: 152)
Drupal\Core\TypedData\Validation\RecursiveContextualValidator->validateNode(Object, Array, 1) (Line: 99)
Drupal\Core\TypedData\Validation\RecursiveContextualValidator->validate(Object, Array, NULL) (Line: 90)
Drupal\Core\TypedData\Validation\RecursiveValidator->validate(Object, Array) (Line: 372)
Drupal\Core\Plugin\Context\ContextDefinition->isSatisfiedBy(Object) (Line: 77)
Drupal\Core\Plugin\Context\ContextHandler->Drupal\Core\Plugin\Context\{closure}(Object)
array_filter(Array, Object) (Line: 78)
Drupal\Core\Plugin\Context\ContextHandler->getMatchingContexts(Array, Object) (Line: 65)
Drupal\Core\Plugin\Context\ContextHandler->checkRequirements(Array, Array) (Line: 31)
Drupal\Core\Plugin\Context\ContextHandler->Drupal\Core\Plugin\Context\{closure}(Object)
array_filter(Array, Object) (Line: 37)
Drupal\Core\Plugin\Context\ContextHandler->filterPluginDefinitionsByContexts(Array, Array) (Line: 92)
Drupal\layout_builder\SectionStorage\SectionStorageManager->findByContext(Array, Object) (Line: 123)
Drupal\layout_builder\InlineBlockEntityOperations->getSectionStorageForEntity(Object) (Line: 38)
Drupal\layout_builder\InlineBlockEntityOperations->isLayoutCompatibleEntity(Object) (Line: 169)
Drupal\layout_builder\InlineBlockEntityOperations->handlePreSave(Object) (Line: 206)
layout_builder_entity_presave(Object, 'ifthenelserule')
call_user_func_array('layout_builder_entity_presave', Array) (Line: 403)
Drupal\Core\Extension\ModuleHandler->invokeAll('entity_presave', Array) (Line: 349)
Drupal\Core\Config\Entity\ConfigEntityStorage->invokeHook('presave', Object) (Line: 500)
Drupal\Core\Entity\EntityStorageBase->doPreSave(Object) (Line: 454)
Drupal\Core\Entity\EntityStorageBase->save(Object) (Line: 263)
Drupal\Core\Config\Entity\ConfigEntityStorage->save(Object) (Line: 394)
Drupal\Core\Entity\EntityBase->save() (Line: 613)
Drupal\Core\Config\Entity\ConfigEntityBase->save() (Line: 343)
Drupal\Core\Config\ConfigInstaller->createConfiguration('', Array) (Line: 132)
Drupal\Core\Config\ConfigInstaller->installDefaultConfig('module', 'if_then_else_examples') (Line: 75)
Drupal\Core\ProxyClass\Config\ConfigInstaller->installDefaultConfig('module', 'if_then_else_examples') (Line: 276)
Drupal\Core\Extension\ModuleInstaller->install(Array, 1) (Line: 83)
Drupal\Core\ProxyClass\Extension\ModuleInstaller->install(Array) (Line: 173)
Drupal\system\Form\ModulesListConfirmForm->submitForm(Array, Object)
call_user_func_array(Array, Array) (Line: 111)
Drupal\Core\Form\FormSubmitter->executeSubmitHandlers(Array, Object) (Line: 51)
Drupal\Core\Form\FormSubmitter->doSubmitForm(Array, Object) (Line: 590)
Drupal\Core\Form\FormBuilder->processForm('system_modules_confirm_form', Array, Object) (Line: 319)
Drupal\Core\Form\FormBuilder->buildForm(Object, Object) (Line: 93)
Drupal\Core\Controller\FormController->getContentResult(Object, Object)
call_user_func_array(Array, Array) (Line: 123)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() (Line: 582)
Drupal\Core\Render\Renderer->executeInRenderContext(Object, Object) (Line: 124)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->wrapControllerExecutionInRenderContext(Array, Array) (Line: 97)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() (Line: 151)
Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object, 1) (Line: 68)
Symfony\Component\HttpKernel\HttpKernel->handle(Object, 1, 1) (Line: 57)
Drupal\Core\StackMiddleware\Session->handle(Object, 1, 1) (Line: 47)
Drupal\Core\StackMiddleware\KernelPreHandle->handle(Object, 1, 1) (Line: 106)
Drupal\page_cache\StackMiddleware\PageCache->pass(Object, 1, 1) (Line: 85)
Drupal\page_cache\StackMiddleware\PageCache->handle(Object, 1, 1) (Line: 47)
Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle(Object, 1, 1) (Line: 52)
Drupal\Core\StackMiddleware\NegotiationMiddleware->handle(Object, 1, 1) (Line: 23)
Stack\StackedHttpKernel->handle(Object, 1, 1) (Line: 693)
Drupal\Core\DrupalKernel->handle(Object) (Line: 19)


Edit:

The error occurs also when example module is not enabled rather as soon as core layout builder is enabled.

Steps to reproduce issue behavior with example sub module

  1. On a vanilla drupal 8.7.8 enable core layout builder
  2. Enable example sub module and save it
  3. The error occurs. The entities of if then else module don't getting saved.

Steps to reproduce issue behavior without example sub module

  1. On a vanilla drupal 8.7.8 enable core layout builder
  2. Create a if then else rule and save it
  3. The error occurs and the rule is not getting saved
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

dercheffe created an issue. See original summary.

vishalkhialani’s picture

Assigned: Unassigned » rensingh99

thank you for raising the ticket we will look into it and update this thread.

Thank you,
Vishal

dercheffe’s picture

Thank you for the fast reply. I guess it has something to do with the core layout builder, which is enabled in my project.

Best regards,

Phil

Drupal\Core\Plugin\Context\ContextHandler->filterPluginDefinitionsByContexts(Array, Array) (Line: 92)
Drupal\layout_builder\SectionStorage\SectionStorageManager->findByContext(Array, Object) (Line: 123)
Drupal\layout_builder\InlineBlockEntityOperations->getSectionStorageForEntity(Object) (Line: 38)
Drupal\layout_builder\InlineBlockEntityOperations->isLayoutCompatibleEntity(Object) (Line: 169)
Drupal\layout_builder\InlineBlockEntityOperations->handlePreSave(Object) (Line: 206)
layout_builder_entity_presave(Object, 'ifthenelserule')
call_user_func_array('layout_builder_entity_presave', Array) (Line: 403)
Drupal\Core\Extension\ModuleHandler->invokeAll('entity_presave', Array) (Line: 349)
dercheffe’s picture

Title: Error when enabling examples sub module » Error saving if then else entities when core layout builder is enabled
Priority: Normal » Major
Issue summary: View changes
vishalkhialani’s picture

I have created a patch. Please review it.

vishalkhialani’s picture

rensingh99’s picture

I have created a patch. Please review it.

rensingh99’s picture

Assigned: rensingh99 » akshay.kelotra
Status: Active » Needs review
akshay.kelotra’s picture

Status: Needs review » Reviewed & tested by the community

I have reviewed this patch and tested it. It is working fine.

neeravbm’s picture

Status: Reviewed & tested by the community » Fixed

Committed this patch to dev branch.

  • rensingh99 authored e691e43 on 8.x-1.x
    Issue #3085495 by vishalkhialani, rensingh99, dercheffe, neeravbm,...
dercheffe’s picture

Works like a charm :)

Thank you for the fast and great work.

akshay.kelotra’s picture

Status: Fixed » Closed (fixed)