Problem/Motivation
When a block contains paragraphs and we will try to export the Section template with such a block we will get an error
Error: Cannot use object of type __PHP_Incomplete_Class as array in Drupal\entity_reference_revisions\Plugin\DataType\EntityReferenceRevisions->setValue() (line 143 of modules/contrib/entity_reference_revisions/src/Plugin/DataType/EntityReferenceRevisions.php).
Why does this happen? Because “Paragraph” is a new object that will be serialized in the LB field along with the block. This means that when the template is inserted, not only the block but also the paragraphs will be created.
Steps to reproduce
1. make a new content block
2. add paragraph field
3. go to the node LB and add this content block with a filled-in paragraph
4. save section to library or all section to template
5. try to export this tempalte
Proposed resolution
Allow unserialise also Paragraph classes.
Issue fork single_content_sync-3593487
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 #3
hitchshockComment #8
nginex commented