Error when adding media in Drupal 10 with Symfony 6 - Non-scalar values in InputBag

Created on 4 March 2023, almost 2 years ago
Updated 17 March 2023, almost 2 years ago

Problem/Motivation

I am encountering errors when trying to add media in Drupal 10 with Symfony 6. Specifically, I am receiving the following error messages when clicking on the "Add Media" button:

Symfony\Component\HttpFoundation\Exception\BadRequestException: Input value "complete_allowed_list" contains a non-scalar value. in Symfony\Component\HttpFoundation\InputBag->get() (line 37 of /var/www/vendor/symfony/http-foundation/InputBag.php).

Symfony\Component\HttpFoundation\Exception\BadRequestException: Input value "media_library_allowed_types" contains a non-scalar value. in Symfony\Component\HttpFoundation\InputBag->get() (line 37 of /var/www/vendor/symfony/http-foundation/InputBag.php).

These errors are preventing me from successfully adding media to my Drupal site with Symfony 6.

Steps to reproduce

Click on Add Media button from a node add page.

Proposed resolution

After investigating this issue, it appears that the errors are caused by non-scalar values in the input bag.
More details are provided in this issue https://www.drupal.org/project/drupal/issues/3254250 β†’

Remaining tasks

Additionally, it is important to verify if there are any other parts of the code where similar issues with non-scalar values may occur.

User interface changes

No

API changes

No

Data model changes

No

πŸ› Bug report
Status

Fixed

Version

1.0

Component

Code

Created by

πŸ‡²πŸ‡©Moldova sandzel Chisinau

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024