Problem/Motivation
When i try to preview a new node when i have nested layouts i get an error:
TypeError: Argument 1 passed to Drupal\layout_paragraphs\LayoutParagraphsLayout::__construct() must implement interface Drupal\Core\Field\EntityReferenceFieldItemListInterface, null given, called in /var/www/html/web/modules/contrib/layout_paragraphs/src/LayoutParagraphsRendererService.php on line 70 in Drupal\layout_paragraphs\LayoutParagraphsLayout->__construct() (Zeile 64 in /var/www/html/web/modules/contrib/layout_paragraphs/src/LayoutParagraphsLayout.php)
It only fails if i try to preview new node, not if the node is already saved.
Steps to reproduce
I've also tried it on simplytest.me
- Create new node
- add paragraph with a layout
- place another paragraph with layout inside a region
- try to preview the node
Issue fork layout_paragraphs-3257758
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #2
hauke-vqComment #4
justin2pin commentedThanks @Hauke Labs - this should be fixed in MR but still needs test coverage.
Comment #7
justin2pin commentedAdded tests. Marking as fixed.