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

Content type validator not working in custom page block

    XMLWordPrintable

Details

    Description

      Steps to reproduce

      1. Install Ibexa DXP v3 or v4
      2. Create a custom page block with a location list and content_type validator
      ibexa_fieldtype_page:
          blocks:
              my_block:
                  name: MyBlock
                  category: default
                  thumbnail: /bundles/ibexaicons/img/all-icons.svg#edit
                  views:
                      default:
                          name: Default block layout
                          template: my_block.html.twig
                          priority: -255
                  attributes:
                      embed_content:
                          type: embed
                          name: Content
                          validators:
                              content_type:
                                  message: You must select a folder
                                  options:
                                      types: folder 
      1. Add a new custom page block and select any content
      2. Save

       

      Result

      Unable to write block and shows below error

      Argument 1 passed to Ibexa\Core\Repository\SiteAccessAware\ContentService::loadContent() must be of the type int, string given, called in /var/www/html/vendor/ibexa/fieldtype-page/src/lib/Validator/Constraints/ContentTypeValidator.php on line 47 

      Expected

      Validation should proceed correctly without error

      Designs

        Attachments

          Activity

            People

              Unassigned Unassigned
              mateusz.debinski@ibexa.co Mateusz Dębiński
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: