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

Editing custom block after adding additional attribute will fail with an exception

    XMLWordPrintable

Details

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: High High
    • 2.2.2
    • 2.2.1
    • Page Builder
    • None

    Description

      Editing custom block after adding additional attribute will fail with an exception.

      Steps to reproduce
      1. Fresh installation 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/custom.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, fill some text in test field and publish it.
      4. Add new locationlist attribute to the custom block:

                  attributes:
                      text:
                          type: text
                          name: test
                      text2:
                          type: text
                          name: test2
      

      5. Go back to Page Builder and click on the edit button on a previously added block, fill some text in test2 field.
      6. Click "Submit".

      Result
      Block edition dialog will break showing Exception:

      Type error: Argument 1 passed to EzSystems\EzPlatformPageBuilder\Data\Attribute\Attribute::setId() must be of the type string, null given
      

      Attachments

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved: