Uploaded image for project: 'eZ Platform Enterprise Edition'
  1. eZ Platform Enterprise Edition
  2. EZEE-2241

Adding embed attribute to previously created custom block breaks Page Builder

    XMLWordPrintable

Details

    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
      

      Attachments

        Activity

          People

            Unassigned Unassigned
            mateusz.bieniek@ibexa.co Mateusz Bieniek
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: