- πΊπΈUnited States john.oltman
The problem comes from entity_redirect's use of the generically named element "workflow" when it injects itself into other modules forms. Any module with a bundle entity type form that already has an element of that name will throw a PHP exception on save. The element name "workflow" is commonly used by modules that use the Workflows module or workflow in general, such as Drupal Commerce. To solve this, please change the module to use a unique element name such as "entity_redirect_workflow" instead of just "workflow" in entity_redirect.module.
- π΅πΉPortugal adaragao
Had this same problem with the module "Entity Registration", had to unnistall this module to work.
Its related to https://www.drupal.org/project/registration/issues/3352096 π¬ PHP exception when saving a registration type and entity_redirect module is enabled Closed: works as designed
Here is the backtrace:
TypeError: Cannot assign array to property Drupal\registration\Entity\RegistrationType::$workflow of type string em Drupal\Core\Config\Entity\ConfigEntityBase->set() (linha 169 de /opt/drupal/web/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php).
Backtrace
#0 /opt/drupal/web/core/lib/Drupal/Core/Entity/EntityForm.php(341): Drupal\Core\Config\Entity\ConfigEntityBase->set()
#1 /opt/drupal/web/core/lib/Drupal/Core/Entity/EntityForm.php(301): Drupal\Core\Entity\EntityForm->copyFormValuesToEntity()
#2 /opt/drupal/web/core/lib/Drupal/Core/Entity/EntityForm.php(171): Drupal\Core\Entity\EntityForm->buildEntity()
#3 [internal function]: Drupal\Core\Entity\EntityForm->afterBuild()
#4 /opt/drupal/web/core/lib/Drupal/Core/Form/FormBuilder.php(1084): call_user_func_array()
#5 /opt/drupal/web/core/lib/Drupal/Core/Form/FormBuilder.php(579): Drupal\Core\Form\FormBuilder->doBuildForm()
#6 /opt/drupal/web/core/lib/Drupal/Core/Form/FormBuilder.php(325): Drupal\Core\Form\FormBuilder->processForm()
#7 /opt/drupal/web/core/lib/Drupal/Core/Controller/FormController.php(73): Drupal\Core\Form\FormBuilder->buildForm()
#8 /opt/drupal/web/core/modules/layout_builder/src/Controller/LayoutBuilderHtmlEntityFormController.php(39): Drupal\Core\Controller\FormController->getContentResult()
#9 [internal function]: Drupal\layout_builder\Controller\LayoutBuilderHtmlEntityFormController->getContentResult()
#10 /opt/drupal/web/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php(123): call_user_func_array()
#11 /opt/drupal/web/core/lib/Drupal/Core/Render/Renderer.php(627): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}()
#12 /opt/drupal/web/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php(121): Drupal\Core\Render\Renderer->executeInRenderContext()
#13 /opt/drupal/web/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php(97): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->wrapControllerExecutionInRenderContext()
#14 /opt/drupal/vendor/symfony/http-kernel/HttpKernel.php(181): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}()
#15 /opt/drupal/vendor/symfony/http-kernel/HttpKernel.php(76): Symfony\Component\HttpKernel\HttpKernel->handleRaw()
#16 /opt/drupal/web/core/lib/Drupal/Core/StackMiddleware/Session.php(58): Symfony\Component\HttpKernel\HttpKernel->handle()
#17 /opt/drupal/web/core/lib/Drupal/Core/StackMiddleware/KernelPreHandle.php(48): Drupal\Core\StackMiddleware\Session->handle()
#18 /opt/drupal/web/core/lib/Drupal/Core/StackMiddleware/ContentLength.php(28): Drupal\Core\StackMiddleware\KernelPreHandle->handle()
#19 /opt/drupal/web/core/modules/big_pipe/src/StackMiddleware/ContentLength.php(32): Drupal\Core\StackMiddleware\ContentLength->handle()
#20 /opt/drupal/web/core/modules/page_cache/src/StackMiddleware/PageCache.php(106): Drupal\big_pipe\StackMiddleware\ContentLength->handle()
#21 /opt/drupal/web/core/modules/page_cache/src/StackMiddleware/PageCache.php(85): Drupal\page_cache\StackMiddleware\PageCache->pass()
#22 /opt/drupal/web/core/lib/Drupal/Core/StackMiddleware/ReverseProxyMiddleware.php(48): Drupal\page_cache\StackMiddleware\PageCache->handle()
#23 /opt/drupal/web/core/lib/Drupal/Core/StackMiddleware/NegotiationMiddleware.php(51): Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle()
#24 /opt/drupal/web/core/lib/Drupal/Core/StackMiddleware/AjaxPageState.php(36): Drupal\Core\StackMiddleware\NegotiationMiddleware->handle()
#25 /opt/drupal/web/core/lib/Drupal/Core/StackMiddleware/StackedHttpKernel.php(51): Drupal\Core\StackMiddleware\AjaxPageState->handle()
#26 /opt/drupal/web/core/lib/Drupal/Core/DrupalKernel.php(704): Drupal\Core\StackMiddleware\StackedHttpKernel->handle()
#27 /opt/drupal/web/index.php(19): Drupal\Core\DrupalKernel->handle()
#28 {main}