Details
-
Bug
-
Resolution: Done
-
Medium
-
4.6.6
-
None
-
Ibexa Commerce, Ibexa Content, Ibexa Experience
-
Yes
Description
1. Add custom Page Block:
config/packages/app_myblock.yaml
ibexa_fieldtype_page: blocks: my_list: name: Custom List category: default thumbnail: /bundles/ibexaicons/img/all-icons.svg#date views: default: template: '@ibexadesign/blocks/custom_list_default.html.twig' name: Default priority: -255 attributes: my_title: type: string name: Title my_list: type: locationlist name: Location List validators: not_blank: message: Choose location items
templates/themes/standard/blocks/custom_list_default.html.twig
Hello World!
2. Edit a Landing Page and add a Block "Custom List"
Result :
- Block is not added
- Symfony profiler shows request to admin/page/block/request-configuration-form returning HTTP status code 500:
ErrorException: Warning: Undefined array key "locationlist" at vendor/ibexa/fieldtype-page/src/lib/FieldType/Page/Block/Attribute/FormTypeMapper/LocationListFormTypeMapper.php:35 at Ibexa\FieldTypePage\FieldType\Page\Block\Attribute\FormTypeMapper\LocationListFormTypeMapper->map(object(FormBuilder), object(BlockDefinition), object(BlockAttributeDefinition), array(object(NotBlank))) (vendor/ibexa/page-builder/src/lib/Form/Type/Attribute/AttributeType.php:87) at Ibexa\PageBuilder\Form\Type\Attribute\AttributeType->buildForm(object(FormBuilder), array('block_name' => null, 'disabled' => false, 'label_format' => null, 'label_translation_parameters' => array(), 'attr_translation_parameters' => array(), 'translation_domain' => null, 'auto_initialize' => true, 'trim' => true, 'required' => true, 'property_path' => null, 'mapped' => true, 'by_reference' => true, 'inherit_data' => false, 'compound' => true, 'method' => 'POST', 'post_max_size_message' => 'The uploaded file was too large. Please try to upload a smaller file.', 'allow_file_upload' => false, 'help_translation_parameters' => array(), 'invalid_message' => 'This value is not valid.', 'invalid_message_parameters' => array(), 'error_mapping' => array(), 'allow_extra_fields' => false, 'extra_fields_message' => 'This form should not contain extra fields.', 'csrf_protection' => true, 'csrf_field_name' => '_token', 'csrf_message' => 'The CSRF token is invalid. Please try to resubmit the form.', 'csrf_token_manager' => object(CsrfTokenManager), 'csrf_token_id' => null, 'help_multiline' => null, 'block_prefix' => null, 'label' => 'Contenus', 'row_attr' => array(), 'label_html' => false, 'attr' => array(), 'priority' => 0, 'form_attr' => false, 'data_class' => 'Ibexa\\PageBuilder\\Data\\Attribute\\Attribute', 'empty_data' => object(Closure), 'error_bubbling' => true, 'label_attr' => array(), 'action' => '', 'upload_max_size_message' => object(Closure), 'help' => null, 'help_attr' => array(), 'help_html' => false, 'is_empty_callback' => null, 'getter' => null, 'setter' => null, 'validation_groups' => null, 'constraints' => array(), 'legacy_error_messages' => true, 'language_code' => 'eng-GB', 'block_definition' => object(BlockDefinition), 'block_attribute_definition' => object(BlockAttributeDefinition))) (vendor/symfony/form/ResolvedFormType.php:131) at Symfony\Component\Form\ResolvedFormType->buildForm(object(FormBuilder), array('block_name' => null, 'disabled' => false, 'label_format' => null, 'label_translation_parameters' => array(), 'attr_translation_parameters' => array(), 'translation_domain' => null, 'auto_initialize' => true, 'trim' => true, 'required' => true, 'property_path' => null, 'mapped' => true, 'by_reference' => true, 'inherit_data' => false, 'compound' => true, 'method' => 'POST', 'post_max_size_message' => 'The uploaded file was too large. Please try to upload a smaller file.', 'allow_file_upload' => false, 'help_translation_parameters' => array(), 'invalid_message' => 'This value is not valid.', 'invalid_message_parameters' => array(), 'error_mapping' => array(), 'allow_extra_fields' => false, 'extra_fields_message' => 'This form should not contain extra fields.', 'csrf_protection' => true, 'csrf_field_name' => '_token', 'csrf_message' => 'The CSRF token is invalid. Please try to resubmit the form.', 'csrf_token_manager' => object(CsrfTokenManager), 'csrf_token_id' => null, 'help_multiline' => null, 'block_prefix' => null, 'label' => 'Contenus', 'row_attr' => array(), 'label_html' => false, 'attr' => array(), 'priority' => 0, 'form_attr' => false, 'data_class' => 'Ibexa\\PageBuilder\\Data\\Attribute\\Attribute', 'empty_data' => object(Closure), 'error_bubbling' => true, 'label_attr' => array(), 'action' => '', 'upload_max_size_message' => object(Closure), 'help' => null, 'help_attr' => array(), 'help_html' => false, 'is_empty_callback' => null, 'getter' => null, 'setter' => null, 'validation_groups' => null, 'constraints' => array(), 'legacy_error_messages' => true, 'language_code' => 'eng-GB', 'block_definition' => object(BlockDefinition), 'block_attribute_definition' => object(BlockAttributeDefinition))) (vendor/symfony/form/Extension/DataCollector/Proxy/ResolvedTypeDataCollectorProxy.php:95) at Symfony\Component\Form\Extension\DataCollector\Proxy\ResolvedTypeDataCollectorProxy->buildForm(object(FormBuilder), array('block_name' => null, 'disabled' => false, 'label_format' => null, 'label_translation_parameters' => array(), 'attr_translation_parameters' => array(), 'translation_domain' => null, 'auto_initialize' => true, 'trim' => true, 'required' => true, 'property_path' => null, 'mapped' => true, 'by_reference' => true, 'inherit_data' => false, 'compound' => true, 'method' => 'POST', 'post_max_size_message' => 'The uploaded file was too large. Please try to upload a smaller file.', 'allow_file_upload' => false, 'help_translation_parameters' => array(), 'invalid_message' => 'This value is not valid.', 'invalid_message_parameters' => array(), 'error_mapping' => array(), 'allow_extra_fields' => false, 'extra_fields_message' => 'This form should not contain extra fields.', 'csrf_protection' => true, 'csrf_field_name' => '_token', 'csrf_message' => 'The CSRF token is invalid. Please try to resubmit the form.', 'csrf_token_manager' => object(CsrfTokenManager), 'csrf_token_id' => null, 'help_multiline' => null, 'block_prefix' => null, 'label' => 'Contenus', 'row_attr' => array(), 'label_html' => false, 'attr' => array(), 'priority' => 0, 'form_attr' => false, 'data_class' => 'Ibexa\\PageBuilder\\Data\\Attribute\\Attribute', 'empty_data' => object(Closure), 'error_bubbling' => true, 'label_attr' => array(), 'action' => '', 'upload_max_size_message' => object(Closure), 'help' => null, 'help_attr' => array(), 'help_html' => false, 'is_empty_callback' => null, 'getter' => null, 'setter' => null, 'validation_groups' => null, 'constraints' => array(), 'legacy_error_messages' => true, 'language_code' => 'eng-GB', 'block_definition' => object(BlockDefinition), 'block_attribute_definition' => object(BlockAttributeDefinition))) (vendor/symfony/form/FormFactory.php:73) at Symfony\Component\Form\FormFactory->createNamedBuilder('contents', object(ResolvedTypeDataCollectorProxy), null, array('label' => 'Contenus', 'block_definition' => object(BlockDefinition), 'block_attribute_definition' => object(BlockAttributeDefinition), 'language_code' => 'eng-GB', 'help' => null, 'help_attr' => array(), 'help_html' => false)) (vendor/symfony/form/FormBuilder.php:97) at Symfony\Component\Form\FormBuilder->create('contents', 'Ibexa\\PageBuilder\\Form\\Type\\Attribute\\AttributeType', array('label' => 'Contenus', 'block_definition' => object(BlockDefinition), 'block_attribute_definition' => object(BlockAttributeDefinition), 'language_code' => 'eng-GB', 'help' => null, 'help_attr' => array(), 'help_html' => false)) (vendor/ibexa/page-builder/src/lib/Form/Type/Block/AttributesType.php:33) at Ibexa\PageBuilder\Form\Type\Block\AttributesType->buildForm(object(FormBuilder), array('block_name' => null, 'disabled' => false, 'label_format' => null, 'label_translation_parameters' => array(), 'attr_translation_parameters' => array(), 'translation_domain' => null, 'auto_initialize' => true, 'trim' => true, 'required' => true, 'property_path' => null, 'mapped' => true, 'by_reference' => true, 'inherit_data' => false, 'compound' => true, 'method' => 'POST', 'post_max_size_message' => 'The uploaded file was too large. Please try to upload a smaller file.', 'allow_file_upload' => false, 'help_translation_parameters' => array(), 'invalid_message' => 'This value is not valid.', 'invalid_message_parameters' => array(), 'error_mapping' => array(), 'allow_extra_fields' => false, 'extra_fields_message' => 'This form should not contain extra fields.', 'csrf_protection' => true, 'csrf_field_name' => '_token', 'csrf_message' => 'The CSRF token is invalid. Please try to resubmit the form.', 'csrf_token_manager' => object(CsrfTokenManager), 'csrf_token_id' => null, 'help_multiline' => null, 'block_prefix' => null, 'label' => false, 'row_attr' => array(), 'label_html' => false, 'attr' => array(), 'priority' => 0, 'form_attr' => false, 'data_class' => null, 'empty_data' => object(Closure), 'error_bubbling' => true, 'label_attr' => array(), 'action' => '', 'upload_max_size_message' => object(Closure), 'help' => null, 'help_attr' => array(), 'help_html' => false, 'is_empty_callback' => null, 'getter' => null, 'setter' => null, 'validation_groups' => null, 'constraints' => array(), 'legacy_error_messages' => true, 'language_code' => 'eng-GB', 'block_type' => object(BlockDefinition))) (vendor/symfony/form/ResolvedFormType.php:131) at Symfony\Component\Form\ResolvedFormType->buildForm(object(FormBuilder), array('block_name' => null, 'disabled' => false, 'label_format' => null, 'label_translation_parameters' => array(), 'attr_translation_parameters' => array(), 'translation_domain' => null, 'auto_initialize' => true, 'trim' => true, 'required' => true, 'property_path' => null, 'mapped' => true, 'by_reference' => true, 'inherit_data' => false, 'compound' => true, 'method' => 'POST', 'post_max_size_message' => 'The uploaded file was too large. Please try to upload a smaller file.', 'allow_file_upload' => false, 'help_translation_parameters' => array(), 'invalid_message' => 'This value is not valid.', 'invalid_message_parameters' => array(), 'error_mapping' => array(), 'allow_extra_fields' => false, 'extra_fields_message' => 'This form should not contain extra fields.', 'csrf_protection' => true, 'csrf_field_name' => '_token', 'csrf_message' => 'The CSRF token is invalid. Please try to resubmit the form.', 'csrf_token_manager' => object(CsrfTokenManager), 'csrf_token_id' => null, 'help_multiline' => null, 'block_prefix' => null, 'label' => false, 'row_attr' => array(), 'label_html' => false, 'attr' => array(), 'priority' => 0, 'form_attr' => false, 'data_class' => null, 'empty_data' => object(Closure), 'error_bubbling' => true, 'label_attr' => array(), 'action' => '', 'upload_max_size_message' => object(Closure), 'help' => null, 'help_attr' => array(), 'help_html' => false, 'is_empty_callback' => null, 'getter' => null, 'setter' => null, 'validation_groups' => null, 'constraints' => array(), 'legacy_error_messages' => true, 'language_code' => 'eng-GB', 'block_type' => object(BlockDefinition))) (vendor/symfony/form/Extension/DataCollector/Proxy/ResolvedTypeDataCollectorProxy.php:95) at Symfony\Component\Form\Extension\DataCollector\Proxy\ResolvedTypeDataCollectorProxy->buildForm(object(FormBuilder), array('block_name' => null, 'disabled' => false, 'label_format' => null, 'label_translation_parameters' => array(), 'attr_translation_parameters' => array(), 'translation_domain' => null, 'auto_initialize' => true, 'trim' => true, 'required' => true, 'property_path' => null, 'mapped' => true, 'by_reference' => true, 'inherit_data' => false, 'compound' => true, 'method' => 'POST', 'post_max_size_message' => 'The uploaded file was too large. Please try to upload a smaller file.', 'allow_file_upload' => false, 'help_translation_parameters' => array(), 'invalid_message' => 'This value is not valid.', 'invalid_message_parameters' => array(), 'error_mapping' => array(), 'allow_extra_fields' => false, 'extra_fields_message' => 'This form should not contain extra fields.', 'csrf_protection' => true, 'csrf_field_name' => '_token', 'csrf_message' => 'The CSRF token is invalid. Please try to resubmit the form.', 'csrf_token_manager' => object(CsrfTokenManager), 'csrf_token_id' => null, 'help_multiline' => null, 'block_prefix' => null, 'label' => false, 'row_attr' => array(), 'label_html' => false, 'attr' => array(), 'priority' => 0, 'form_attr' => false, 'data_class' => null, 'empty_data' => object(Closure), 'error_bubbling' => true, 'label_attr' => array(), 'action' => '', 'upload_max_size_message' => object(Closure), 'help' => null, 'help_attr' => array(), 'help_html' => false, 'is_empty_callback' => null, 'getter' => null, 'setter' => null, 'validation_groups' => null, 'constraints' => array(), 'legacy_error_messages' => true, 'language_code' => 'eng-GB', 'block_type' => object(BlockDefinition))) (vendor/symfony/form/FormFactory.php:73) at Symfony\Component\Form\FormFactory->createNamedBuilder('attributes', object(ResolvedTypeDataCollectorProxy), null, array('label' => false, 'block_type' => object(BlockDefinition), 'language_code' => 'eng-GB')) (vendor/symfony/form/FormBuilder.php:97) at Symfony\Component\Form\FormBuilder->create('attributes', 'Ibexa\\PageBuilder\\Form\\Type\\Block\\AttributesType', array('label' => false, 'block_type' => object(BlockDefinition), 'language_code' => 'eng-GB')) (vendor/symfony/form/FormBuilder.php:249) at Symfony\Component\Form\FormBuilder->resolveChildren() (vendor/symfony/form/FormBuilder.php:199) at Symfony\Component\Form\FormBuilder->getForm() (vendor/symfony/form/FormFactory.php:31) at Symfony\Component\Form\FormFactory->create('Ibexa\\PageBuilder\\Form\\Type\\Block\\BlockConfigurationType', object(BlockConfiguration), array('action' => '/admin/page/block/configure/thumbnail_link/eng-GB', 'method' => 'POST', 'block_type' => object(BlockDefinition), 'language_code' => 'eng-GB')) (vendor/symfony/framework-bundle/Controller/AbstractController.php:366) at Symfony\Bundle\FrameworkBundle\Controller\AbstractController->createForm('Ibexa\\PageBuilder\\Form\\Type\\Block\\BlockConfigurationType', object(BlockConfiguration), array('action' => '/admin/page/block/configure/thumbnail_link/eng-GB', 'method' => 'POST', 'block_type' => object(BlockDefinition), 'language_code' => 'eng-GB')) (vendor/ibexa/page-builder/src/bundle/Controller/BlockController.php:95) at Ibexa\Bundle\PageBuilder\Controller\BlockController->requestBlockConfigurationAction(object(Request)) (vendor/symfony/http-kernel/HttpKernel.php:163) at Symfony\Component\HttpKernel\HttpKernel->handleRaw(object(Request), 1) (vendor/symfony/http-kernel/HttpKernel.php:75) at Symfony\Component\HttpKernel\HttpKernel->handle(object(Request), 1, true) (vendor/symfony/http-kernel/Kernel.php:202) at Symfony\Component\HttpKernel\Kernel->handle(object(Request)) (vendor/symfony/runtime/Runner/Symfony/HttpKernelRunner.php:35) at Symfony\Component\Runtime\Runner\Symfony\HttpKernelRunner->run() (vendor/autoload_runtime.php:35) at require_once('/var/www/html/vendor/autoload_runtime.php') (public/index.php:5)