Details
-
Bug
-
Resolution: Fixed
-
High
-
2.2.1, 2.2.2
-
None
Description
Adding embed attribute to previously created block breaks Page Builder on attempting edition of said block.
Steps to reproduce
1. Fresh install of eZ Platform 2.2.1 EE
2. Create a custom block using this code inside ezplatform.yml:
ezplatform_page_fieldtype: blocks: example_block: name: 'Custom Block' thumbnail: 'assets/images/blocks/cutom.svg' views: default: template: 'blocks/template.html.twig' name: 'Default view' attributes: text: type: text name: test
3. Add newly created block to landing page and publish it.
4. Add new embed attribute to the custom block:
attributes:
text:
type: text
name: test
embed:
type: embed
name: 'Embed'
5. Go back to Page Builder and click on the edit button on a previously added block.
Result
Page Builder will break and will stay greyed out until a page refresh. In logs there will be information about thrown exception:
Symfony\Component\Debug\Exception\FatalThrowableError:
Call to a member function getValue() on null
at vendor/ezsystems/ezplatform-page-fieldtype/src/lib/Form/Type/BlockAttribute/AttributeEmbedType.php:64