Details
-
Bug
-
Resolution: Unresolved
-
High
-
None
-
3.0.1
Description
Steps:
- Create new content type 'test'
- Add 'ezobjectrelationlist' field to CT
- Set 'Allowed Content types' to Article
- Set Selection limit' to 2 and save
- Go to Content/Content structure and create new content with CT 'test'
- Select 3 articles and click OK
- Click 'Publish' button
Result:
Error 500 pops up:
TypeError: Argument 1 passed to eZ\Publish\Core\Repository\SiteAccessAware\ContentService::loadContentInfo() must be of the type int, string given, called in /Users/ts/ezplat3oss/vendor/ezsystems/ezplatform-content-forms/src/lib/Form/Type/FieldType/RelationListFieldType.php on line 83 at vendor/ezsystems/ezplatform-kernel/eZ/Publish/Core/Repository/SiteAccessAware/ContentService.php:52 at eZ\Publish\Core\Repository\SiteAccessAware\ContentService->loadContentInfo('55') (vendor/ezsystems/ezplatform-content-forms/src/lib/Form/Type/FieldType/RelationListFieldType.php:83) at EzSystems\EzPlatformContentForms\Form\Type\FieldType\RelationListFieldType->finishView(object(FormView), object(Form), 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, 'property_path' => null, 'mapped' => true, 'by_reference' => true, 'inherit_data' => false, 'compound' => false, 'method' => 'POST', 'action' => '', '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(), 'error_mapping' => array(), 'invalid_message' => 'This value is not valid.', 'invalid_message_parameters' => 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' => 'New FieldDefinition', 'row_attr' => array(), 'attr' => array(), 'data_class' => null, 'empty_data' => object(Closure), 'required' => false, 'error_bubbling' => false, 'label_attr' => array(), 'upload_max_size_message' => object(Closure), 'help' => null, 'help_attr' => array(), 'help_html' => false, 'validation_groups' => null, 'constraints' => array(), 'default_location' => null)) (vendor/symfony/form/ResolvedFormType.php:164) at Symfony\Component\Form\ResolvedFormType->finishView(object(FormView), object(Form), 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, 'property_path' => null, 'mapped' => true, 'by_reference' => true, 'inherit_data' => false, 'compound' => false, 'method' => 'POST', 'action' => '', '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(), 'error_mapping' => array(), 'invalid_message' => 'This value is not valid.', 'invalid_message_parameters' => 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' => 'New FieldDefinition', 'row_attr' => array(), 'attr' => array(), 'data_class' => null, 'empty_data' => object(Closure), 'required' => false, 'error_bubbling' => false, 'label_attr' => array(), 'upload_max_size_message' => object(Closure), 'help' => null, 'help_attr' => array(), 'help_html' => false, 'validation_groups' => null, 'constraints' => array(), 'default_location' => null)) (vendor/symfony/form/Extension/DataCollector/Proxy/ResolvedTypeDataCollectorProxy.php:111) at Symfony\Component\Form\Extension\DataCollector\Proxy\ResolvedTypeDataCollectorProxy->finishView(object(FormView), object(Form), 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, 'property_path' => null, 'mapped' => true, 'by_reference' => true, 'inherit_data' => false, 'compound' => false, 'method' => 'POST', 'action' => '', '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(), 'error_mapping' => array(), 'invalid_message' => 'This value is not valid.', 'invalid_message_parameters' => 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' => 'New FieldDefinition', 'row_attr' => array(), 'attr' => array(), 'data_class' => null, 'empty_data' => object(Closure), 'required' => false, 'error_bubbling' => false, 'label_attr' => array(), 'upload_max_size_message' => object(Closure), 'help' => null, 'help_attr' => array(), 'help_html' => false, 'validation_groups' => null, 'constraints' => array(), 'default_location' => null)) (vendor/symfony/form/Form.php:1039) at Symfony\Component\Form\Form->createView(object(FormView)) (vendor/symfony/form/Form.php:1036) at Symfony\Component\Form\Form->createView(object(FormView)) (vendor/symfony/form/Form.php:1036) at Symfony\Component\Form\Form->createView(object(FormView)) (vendor/symfony/form/Form.php:1036) at Symfony\Component\Form\Form->createView() (vendor/ezsystems/ezplatform-content-forms/src/lib/Content/View/Builder/ContentCreateViewBuilder.php:114) at EzSystems\EzPlatformContentForms\Content\View\Builder\ContentCreateViewBuilder->buildView(array('is_rest_request' => false, 'siteaccess' => object(SiteAccess), 'semanticPathinfo' => '/content/create/nodraft/test3/eng-GB/2', 'viewParameters' => array(), 'viewParametersString' => '', '_route' => 'ezplatform.content.create_no_draft', '_controller' => 'ez_content_edit:createWithoutDraftAction', 'contentTypeIdentifier' => 'test3', 'language' => 'eng-GB', 'parentLocationId' => '2', '_route_params' => array('contentTypeIdentifier' => 'test3', 'language' => 'eng-GB', 'parentLocationId' => '2'), '_locale' => 'en', '_firewall_context' => 'security.firewall.map.context.ezpublish_front', 'viewType' => null, 'form' => object(Form))) (vendor/ezsystems/ezplatform-kernel/eZ/Bundle/EzPublishCoreBundle/EventListener/ViewControllerListener.php:70) at eZ\Bundle\EzPublishCoreBundle\EventListener\ViewControllerListener->getController(object(ControllerEvent), 'kernel.controller', object(TraceableEventDispatcher)) (vendor/symfony/event-dispatcher/Debug/WrappedListener.php:117) at Symfony\Component\EventDispatcher\Debug\WrappedListener->__invoke(object(ControllerEvent), 'kernel.controller', object(TraceableEventDispatcher)) (vendor/symfony/event-dispatcher/EventDispatcher.php:230) at Symfony\Component\EventDispatcher\EventDispatcher->callListeners(array(object(WrappedListener), object(WrappedListener), object(WrappedListener), object(WrappedListener), object(WrappedListener), object(WrappedListener), object(WrappedListener)), 'kernel.controller', object(ControllerEvent)) (vendor/symfony/event-dispatcher/EventDispatcher.php:59) at Symfony\Component\EventDispatcher\EventDispatcher->dispatch(object(ControllerEvent), 'kernel.controller') (vendor/symfony/event-dispatcher/Debug/TraceableEventDispatcher.php:151) at Symfony\Component\EventDispatcher\Debug\TraceableEventDispatcher->dispatch(object(ControllerEvent), 'kernel.controller') (vendor/symfony/http-kernel/HttpKernel.php:145) at Symfony\Component\HttpKernel\HttpKernel->handleRaw(object(Request), 1) (vendor/symfony/http-kernel/HttpKernel.php:79) at Symfony\Component\HttpKernel\HttpKernel->handle(object(Request), 1, true) (vendor/symfony/http-kernel/Kernel.php:191) at Symfony\Component\HttpKernel\Kernel->handle(object(Request)) (public/index.php:42)
Expected Result:**
Its not possible to select items above the Selection Limit