Uploaded image for project: 'Ibexa IBX'
  1. Ibexa IBX
  2. IBX-7947

The `help` option in the `select` attribute type in a block doesn't work properly

Details

    • Ibexa Experience
    • Yes

    Description

      Steps to reproduce:

      1. Create a new custom Page Builder block:
        ibexa_fieldtype_page:
            blocks:
                event:
                    views:
                        default:
                            template: '@ibexadesign/blocks/event/template.html.twig'
                            name: Default view
                            priority: -255
                    name: Event Block
                    category: Custom
                    thumbnail: /bundles/ibexaicons/img/all-icons.svg#date
                    attributes:
                        name:
                            type: text
                            name: Event name
                            validators:
                                not_blank:
                                    message: Please provide a name
                        category:
                            type: select
                            name: Select a category
                            value: visual
                            options:
                                multiple: true
                                choices:
                                    'Music': music
                                    'Visual arts': visual
                                    'Sports': sports
                                help:
                                    text: '<h3>Overwrites page setting for this block.</h3>'
                                    html: true
        
      2. Add this block in a Landing Page and then try to configure this block inside Page Builder.

      Expected result:
      One is presented with an exception:

      An error has occurred resolving the options of the form "Ibexa\FieldTypePage\Form\Type\BlockAttribute\AttributeSelectType": The option "help" with value array is expected to be of type "string" or "null" or "Symfony\Component\Translation\TranslatableMessage", but is of type "array".

      Result:
      The block should be configurable without an issue.

      Designs

        Attachments

          Activity

            People

              bartlomiej.wajda@ibexa.co Bartłomiej Wajda
              bartlomiej.wajda@ibexa.co Bartłomiej Wajda
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated: