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

Impossible to create content with Image Asset fieldtype

    XMLWordPrintable

Details

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: High High
    • 4.6.0-beta4
    • None
    • None

    Description

      Trying to create a Content Item with an image asset field fails with:

      Ibexa\ContentForms\Form\Type\FieldType\ImageAssetFieldType::getMaxFileSize(): Return value must be of type int, float returned [in vendor/ibexa/content-forms/src/lib/Form/Type/FieldType/ImageAssetFieldType.php:136]

      Steps to reproduce:
      1. Login as admin
      2. Change the file upload limit for the default image Content Type to 1.5 MB
      3. Create a Content Type with two fields:

      • ezrichtext
      • ezimageasset

      4. Start Creating a Content Item of the newly created content type

      Expected:
      It's possible to create an item like this

      Actual:
      Starting the creation process fails with the message mentioned above.

      Stack trace:

      ypeError:
      Ibexa\ContentForms\Form\Type\FieldType\ImageAssetFieldType::getMaxFileSize(): Return value must be of type int, float returned
      
        at vendor/ibexa/content-forms/src/lib/Form/Type/FieldType/ImageAssetFieldType.php:136
        at Ibexa\ContentForms\Form\Type\FieldType\ImageAssetFieldType->getMaxFileSize()
           (vendor/ibexa/content-forms/src/lib/Form/Type/FieldType/ImageAssetFieldType.php:81)
        at Ibexa\ContentForms\Form\Type\FieldType\ImageAssetFieldType->buildForm(object(FormBuilder), array('block_name' => null, 'disabled' => false, 'label_format' => null, 'label_translation_parameters' => array(), 'attr_translation_parameters' => array(), 'translation_domain' => 'ezplatform_content_forms_fieldtype', 'auto_initialize' => true, 'trim' => 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, 'source' => null, 'block_prefix' => null, 'label' => 'New field type', 'row_attr' => array(), 'label_html' => false, 'attr' => array(), 'priority' => 0, 'form_attr' => false, 'data_class' => null, 'empty_data' => object(Closure), 'required' => false, '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))
           (vendor/ibexa/connector-dam/src/lib/Form/FieldType/ImageAssetFieldType.php:54)
        at Ibexa\Connector\Dam\Form\FieldType\ImageAssetFieldType->buildForm(object(FormBuilder), array('block_name' => null, 'disabled' => false, 'label_format' => null, 'label_translation_parameters' => array(), 'attr_translation_parameters' => array(), 'translation_domain' => 'ezplatform_content_forms_fieldtype', 'auto_initialize' => true, 'trim' => 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.',
      

      Designs

        Attachments

          Activity

            People

              Unassigned Unassigned
              marek.nocon@ibexa.co Marek Nocoń
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: