I'm posting this in the Panelizer queue because as far as I can tell this only affects the IPE on Panelizer pages. If this is wrong feel free to reassign.

The issue was also reported here: #2744145: Panels IPE error after toggling preview but it was marked as fixed by #2700597: Explicitly set the Panels IPE URL root when saving in Panelizer. My test installation has this fix but the problem still persists.

This is reproducible on a fresh Drupal installation.

drupal/core 8.3.5
drupal/panels 4.1.0
drupal/panelizer 4.x-dev

To reproduce:

  1. Go to Structure > Content types > Article > Manage display
  2. Check Panelize this view mode, then check Allow each content item to have its display customized; save.
  3. Create an article node and view it.
  4. In the in-place editor (IPE), click "Manage content"
  5. Click "Create content"
  6. Select "Basic block"
  7. Fill in some placeholder info and click the "Create and place" button
  8. Click "Toggle preview" button
  9. Click "Add" button
  10. Hit "Save"

At this point the spinner keeps spinning. Checking the logs, the following error is generated:

Drupal\Component\Plugin\Exception\PluginNotFoundException: Plugin ID '2d82fabe-2271-4f94-b169-912d3b0e68e3' was not found. in Drupal\Core\Plugin\DefaultLazyPluginCollection->initializePlugin() (line 79 of D:\xampp\htdocs\d8\web\core\lib\Drupal\Core\Plugin\DefaultLazyPluginCollection.php).

I tried to also reproduce this on a page created via the Page Manager UI, but when I edit those via the IPE I do not get an error.

If I can offer any further information that would be helpful, let me know.

Thanks!

Comments

othermachines created an issue. See original summary.

othermachines’s picture

othermachines’s picture

Issue summary: View changes

I modified the steps in the OP. Allow each content item to have its display customized must also be checked in Manage display or save is always impossible, even when preview is not toggled. Possibly this is by design (I'm new to Panelizer), but it generates an error:

Drupal\Component\Plugin\Exception\PluginNotFoundException: The "" entity type does not exist. in Drupal\Core\Entity\EntityTypeManager->getDefinition() (line 133 of D:\xampp\htdocs\d8\web\core\lib\Drupal\Core\Entity\EntityTypeManager.php).

Update: Ah-ha, that issue has been reported: #2878814: Unchecked "Allow each content item to have its display customized" lead to "The "" entity type does not exist"

othermachines’s picture

This is still occurring in Panels 8.x-4.2.

vikasshishodia51’s picture

Priority: Normal » Critical

Anyone have any solution to save after toggle preview.

Cecilina’s picture

We encountered the same issue. I have debug the causing of this issue. The dependency injection "Drupal\panels\Plugin\DisplayVariant\PanelsDisplayVariant" $panels_display object successfully generated by every requests, "toggle preview", "update" action and so on. But when the form got through form build by "Drupal\Core\Form\FormBuilder", it alter the $panels_display object. Because there is an cache available for the form in line 293, it reset the build_info['args'] of $form_state. While the contexts of build_info['args'][1] in the cached$cache_form_state object return as null (can debug by $cache_form_state->getBuildInfo()['args'][1]->getContexts()), which means it doesn't cache the contexts for the PanelsDisplayVariant, causing the $panels_display doesn't contains any contexts leading to this error. Hope this information helps.

Cecilina’s picture

It looks like this issue fixed on
drupal/core 8.4.4,
"drupal/panelizer": "4.0.0",
"drupal/panels": "4.2.0".

Can anyone confirm it? Thanks!

othermachines’s picture

@Cecilina - Have you recreated the steps in the OP on a fresh installation? I can confirm this is still a bug in

drupal/core 8.4.5
drupal/panelizer 4.0
drupal/panels 4.2.0

and

drupal/core 8.5.0
drupal/panelizer dev-4.x
drupal/panels 4.2.0

othermachines’s picture

andres.torres’s picture

Drupal Core 8.5.3 - After updating to the latest Panels/Panelizer release i can confirm the issue + the following errors are logged:

Message Warning: array_unique() expects parameter 1 to be array, string given in Drupal\bootstrap\Utility\Attributes->getClasses() (line 59 of /home/andres/www/city-of-gonzales/themes/contrib/bootstrap/src/Utility/Attributes.php) #0 /home/andres/www/city-of-gonzales/core/includes/bootstrap.inc(582): _drupal_error_handler_real(2, 'array_unique() ...', '/home/andres/ww...', 59, Array) #1 [internal function]: _drupal_error_handler(2, 'array_unique() ...', '/home/andres/ww...', 59, Array) #2 /home/andres/www/city-of-gonzales/themes/contrib/bootstrap/src/Utility/Attributes.php(59): array_unique('back') #3 /home/andres/www/city-of-gonzales/themes/contrib/bootstrap/src/Utility/Attributes.php(93): Drupal\bootstrap\Utility\Attributes->getClasses() #4 /home/andres/www/city-of-gonzales/themes/contrib/bootstrap/src/Utility/DrupalAttributes.php(240): Drupal\bootstrap\Utility\Attributes->hasClass('container-inlin...') #5 /home/andres/www/city-of-gonzales/themes/contrib/bootstrap/src/Plugin/ProcessManager.php(62): Drupal\bootstrap\Utility\DrupalAttributes->hasClass('container-inlin...') #6 [internal function]: Drupal\bootstrap\Plugin\ProcessManager::process(Array, Object(Drupal\Core\Form\FormState), Array) #7 /home/andres/www/city-of-gonzales/core/lib/Drupal/Core/Form/FormBuilder.php(993): call_user_func_array(Array, Array) #8 /home/andres/www/city-of-gonzales/core/lib/Drupal/Core/Form/FormBuilder.php(1056): Drupal\Core\Form\FormBuilder->doBuildForm('panels_ipe_bloc...', Array, Object(Drupal\Core\Form\FormState)) #9 /home/andres/www/city-of-gonzales/core/lib/Drupal/Core/Form/FormBuilder.php(1056): Drupal\Core\Form\FormBuilder->doBuildForm('panels_ipe_bloc...', Array, Object(Drupal\Core\Form\FormState)) #10 /home/andres/www/city-of-gonzales/core/lib/Drupal/Core/Form/FormBuilder.php(557): Drupal\Core\Form\FormBuilder->doBuildForm('panels_ipe_bloc...', Array, Object(Drupal\Core\Form\FormState)) #11 /home/andres/www/city-of-gonzales/core/lib/Drupal/Core/Form/FormBuilder.php(314): Drupal\Core\Form\FormBuilder->processForm('panels_ipe_bloc...', Array, Object(Drupal\Core\Form\FormState)) #12 /home/andres/www/city-of-gonzales/core/lib/Drupal/Core/Form/FormBuilder.php(212): Drupal\Core\Form\FormBuilder->buildForm('panels_ipe_bloc...', Object(Drupal\Core\Form\FormState)) #13 /home/andres/www/city-of-gonzales/modules/contrib/panels/panels_ipe/src/Controller/PanelsIPEPageController.php(393): Drupal\Core\Form\FormBuilder->getForm('Drupal\\panels_i...', 'entity_field:no...', Object(Drupal\panels\Plugin\DisplayVariant\PanelsDisplayVariant), '247456e7-99ca-4...') #14 [internal function]: Drupal\panels_ipe\Controller\PanelsIPEPageController->getBlockPluginForm('panelizer_field', 'node:151:full', 'entity_field:no...', '247456e7-99ca-4...') #15 /home/andres/www/city-of-gonzales/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php(123): call_user_func_array(Array, Array) #16 /home/andres/www/city-of-gonzales/core/lib/Drupal/Core/Render/Renderer.php(582): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() #17 /home/andres/www/city-of-gonzales/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php(124): Drupal\Core\Render\Renderer->executeInRenderContext(Object(Drupal\Core\Render\RenderContext), Object(Closure)) #18 /home/andres/www/city-of-gonzales/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php(97): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->wrapControllerExecutionInRenderContext(Array, Array) #19 /home/andres/www/city-of-gonzales/vendor/symfony/http-kernel/HttpKernel.php(151): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() #20 /home/andres/www/city-of-gonzales/vendor/symfony/http-kernel/HttpKernel.php(68): Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object(Symfony\Component\HttpFoundation\Request), 1) #21 /home/andres/www/city-of-gonzales/core/lib/Drupal/Core/StackMiddleware/Session.php(57): Symfony\Component\HttpKernel\HttpKernel->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true) #22 /home/andres/www/city-of-gonzales/core/lib/Drupal/Core/StackMiddleware/KernelPreHandle.php(47): Drupal\Core\StackMiddleware\Session->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true) #23 /home/andres/www/city-of-gonzales/core/modules/page_cache/src/StackMiddleware/PageCache.php(99): Drupal\Core\StackMiddleware\KernelPreHandle->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true) #24 /home/andres/www/city-of-gonzales/core/modules/page_cache/src/StackMiddleware/PageCache.php(78): Drupal\page_cache\StackMiddleware\PageCache->pass(Object(Symfony\Component\HttpFoundation\Request), 1, true) #25 /home/andres/www/city-of-gonzales/core/lib/Drupal/Core/StackMiddleware/ReverseProxyMiddleware.php(47): Drupal\page_cache\StackMiddleware\PageCache->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true) #26 /home/andres/www/city-of-gonzales/core/lib/Drupal/Core/StackMiddleware/NegotiationMiddleware.php(50): Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true) #27 /home/andres/www/city-of-gonzales/vendor/stack/builder/src/Stack/StackedHttpKernel.php(23): Drupal\Core\StackMiddleware\NegotiationMiddleware->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true) #28 /home/andres/www/city-of-gonzales/core/lib/Drupal/Core/DrupalKernel.php(664): Stack\StackedHttpKernel->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true) #29 /home/andres/www/city-of-gonzales/index.php(19): Drupal\Core\DrupalKernel->handle(Object(Symfony\Component\HttpFoundation\Request)) #30 {main}.

Warning: array_intersect(): Argument #2 is not an array in Drupal\bootstrap\Utility\Attributes->hasClass() (line 93 of /home/andres/www/city-of-gonzales/themes/contrib/bootstrap/src/Utility/Attributes.php) #0 /home/andres/www/city-of-gonzales/core/includes/bootstrap.inc(582): _drupal_error_handler_real(2, 'array_intersect...', '/home/andres/ww...', 93, Array) #1 [internal function]: _drupal_error_handler(2, 'array_intersect...', '/home/andres/ww...', 93, Array) #2 /home/andres/www/city-of-gonzales/themes/contrib/bootstrap/src/Utility/Attributes.php(93): array_intersect(Array, NULL) #3 /home/andres/www/city-of-gonzales/themes/contrib/bootstrap/src/Utility/DrupalAttributes.php(240): Drupal\bootstrap\Utility\Attributes->hasClass('container-inlin...') #4 /home/andres/www/city-of-gonzales/themes/contrib/bootstrap/src/Plugin/ProcessManager.php(62): Drupal\bootstrap\Utility\DrupalAttributes->hasClass('container-inlin...') #5 [internal function]: Drupal\bootstrap\Plugin\ProcessManager::process(Array, Object(Drupal\Core\Form\FormState), Array) #6 /home/andres/www/city-of-gonzales/core/lib/Drupal/Core/Form/FormBuilder.php(993): call_user_func_array(Array, Array) #7 /home/andres/www/city-of-gonzales/core/lib/Drupal/Core/Form/FormBuilder.php(1056): Drupal\Core\Form\FormBuilder->doBuildForm('panels_ipe_bloc...', Array, Object(Drupal\Core\Form\FormState)) #8 /home/andres/www/city-of-gonzales/core/lib/Drupal/Core/Form/FormBuilder.php(1056): Drupal\Core\Form\FormBuilder->doBuildForm('panels_ipe_bloc...', Array, Object(Drupal\Core\Form\FormState)) #9 /home/andres/www/city-of-gonzales/core/lib/Drupal/Core/Form/FormBuilder.php(557): Drupal\Core\Form\FormBuilder->doBuildForm('panels_ipe_bloc...', Array, Object(Drupal\Core\Form\FormState)) #10 /home/andres/www/city-of-gonzales/core/lib/Drupal/Core/Form/FormBuilder.php(314): Drupal\Core\Form\FormBuilder->processForm('panels_ipe_bloc...', Array, Object(Drupal\Core\Form\FormState)) #11 /home/andres/www/city-of-gonzales/core/lib/Drupal/Core/Form/FormBuilder.php(212): Drupal\Core\Form\FormBuilder->buildForm('panels_ipe_bloc...', Object(Drupal\Core\Form\FormState)) #12 /home/andres/www/city-of-gonzales/modules/contrib/panels/panels_ipe/src/Controller/PanelsIPEPageController.php(393): Drupal\Core\Form\FormBuilder->getForm('Drupal\\panels_i...', 'entity_field:no...', Object(Drupal\panels\Plugin\DisplayVariant\PanelsDisplayVariant), '247456e7-99ca-4...') #13 [internal function]: Drupal\panels_ipe\Controller\PanelsIPEPageController->getBlockPluginForm('panelizer_field', 'node:151:full', 'entity_field:no...', '247456e7-99ca-4...') #14 /home/andres/www/city-of-gonzales/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php(123): call_user_func_array(Array, Array) #15 /home/andres/www/city-of-gonzales/core/lib/Drupal/Core/Render/Renderer.php(582): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() #16 /home/andres/www/city-of-gonzales/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php(124): Drupal\Core\Render\Renderer->executeInRenderContext(Object(Drupal\Core\Render\RenderContext), Object(Closure)) #17 /home/andres/www/city-of-gonzales/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php(97): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->wrapControllerExecutionInRenderContext(Array, Array) #18 /home/andres/www/city-of-gonzales/vendor/symfony/http-kernel/HttpKernel.php(151): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() #19 /home/andres/www/city-of-gonzales/vendor/symfony/http-kernel/HttpKernel.php(68): Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object(Symfony\Component\HttpFoundation\Request), 1) #20 /home/andres/www/city-of-gonzales/core/lib/Drupal/Core/StackMiddleware/Session.php(57): Symfony\Component\HttpKernel\HttpKernel->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true) #21 /home/andres/www/city-of-gonzales/core/lib/Drupal/Core/StackMiddleware/KernelPreHandle.php(47): Drupal\Core\StackMiddleware\Session->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true) #22 /home/andres/www/city-of-gonzales/core/modules/page_cache/src/StackMiddleware/PageCache.php(99): Drupal\Core\StackMiddleware\KernelPreHandle->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true) #23 /home/andres/www/city-of-gonzales/core/modules/page_cache/src/StackMiddleware/PageCache.php(78): Drupal\page_cache\StackMiddleware\PageCache->pass(Object(Symfony\Component\HttpFoundation\Request), 1, true) #24 /home/andres/www/city-of-gonzales/core/lib/Drupal/Core/StackMiddleware/ReverseProxyMiddleware.php(47): Drupal\page_cache\StackMiddleware\PageCache->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true) #25 /home/andres/www/city-of-gonzales/core/lib/Drupal/Core/StackMiddleware/NegotiationMiddleware.php(50): Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true) #26 /home/andres/www/city-of-gonzales/vendor/stack/builder/src/Stack/StackedHttpKernel.php(23): Drupal\Core\StackMiddleware\NegotiationMiddleware->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true) #27 /home/andres/www/city-of-gonzales/core/lib/Drupal/Core/DrupalKernel.php(664): Stack\StackedHttpKernel->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true) #28 /home/andres/www/city-of-gonzales/index.php(19): Drupal\Core\DrupalKernel->handle(Object(Symfony\Component\HttpFoundation\Request)) #29 {main}.

othermachines’s picture

andres.torres’s picture

@othermachines - thanks for bringing this up, wasn't able to relate the issue since all these errors are logged during a saving process. Was worth to mention though.