Commit 7cac7aab authored by Bas Vredeling's avatar Bas Vredeling
Browse files

Issue #3170138 by jhaskins, mallezie, basvredeling: Attempting to add a...

Issue #3170138 by jhaskins, mallezie, basvredeling: Attempting to add a paragraph from another content type breaks layout builder
parent 84944238
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -92,9 +92,12 @@ class ParagraphBlocksDeriver extends EntityDeriverBase {
              '@bundle_label' => $bundle_label,
            ]);
            $plugin_id = "$entity_type_id:$field_name:$delta:$bundle";
            $context_definition = EntityContextDefinition::fromEntityTypeId($entity_type_id);
            $context_definition->addConstraint('Bundle', [$bundle]);
            $this->derivatives[$plugin_id] = [
              'context_definitions' => [
                'entity' => EntityContextDefinition::fromEntityTypeId($entity_type_id),
                'entity' => $context_definition,
                'view_mode' => new ContextDefinition('string'),
              ],
              'admin_label' => $admin_label,
            ] + $base_plugin_definition;