Unchecked "Allow each content item to have its display customized" lead to "The "" entity type does not exist"

Created on 16 May 2017, over 7 years ago
Updated 25 April 2024, 8 months ago

Steps to reproduce

  1. Create content type
  2. Enable Panelize this view mode on admin/structure/types/manage/{content_type}/display, and ensure Allow each content item to have its display customized is disabled. Save settings.
  3. Add new block to page and hit Save

Result

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

Digging deeper

Inside of panelizer_panels_build_alter() function exist an line:

'panelizer_field_storage_id' => $panelizer->hasEntityPermission('change content', $entity, $view_mode) ? $panelizer_field_storage_id : FALSE,

which leads to execution of \Drupal\panelizer\Panelizer::hasEntityPermission() which will return FALSE every time, when Allow each content item to have its display customized checkbox is unchecked.

πŸ› Bug report
Status

Active

Version

4.0

Component

Code

Created by

πŸ‡ΊπŸ‡¦Ukraine BR0kEN Dnipro

Live updates comments and jobs are added and updated live.
  • Needs tests

    The change is currently missing an automated test that fails when run with the original code, and succeeds when the bug has been fixed.

Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024