Skip to content
Snippets Groups Projects

Issue #3352822: Paragraph parent entity property is empty when adding new paragraphs

1 file
+ 4
1
Compare changes
  • Side-by-side
  • Inline
@@ -110,8 +110,11 @@ class InsertComponentForm extends ComponentFormBase {
$this->paragraphDefaults = $paragraph_defaults;
}
$this->setLayoutParagraphsLayout($layout_paragraphs_layout);
$langcode = $this->layoutParagraphsLayout->getEntity()->language()->getId();
$parent_entity = $this->layoutParagraphsLayout->getEntity();
$langcode = $parent_entity->language()->getId();
$field_name = $this->layoutParagraphsLayout->getFieldName();
$this->paragraph = $this->newParagraph($paragraph_type, $langcode);
$this->paragraph->setParentEntity($parent_entity, $field_name);
$this->parentUuid = $parent_uuid;
$this->region = $region;
Loading