- Issue created by @sourav_paul
- ๐ณ๐ฟNew Zealand quietone
Fixes are made on on 11.x (our main development branch) first, and are then back ported as needed according to our policies. Also, 10.2 is in security mode now.
Does this bug require the
sitestudio_page_builder
module to reproduce? It is installed on that site. Itโs in the stack trace. But itโs not in the steps to reproduce.- ๐ฎ๐ณIndia sourav_paul Kolkata
@cilefen site studio is not required to reproduce the issue....
- Status changed to Postponed: needs info
12 months ago 1:13pm 5 July 2024 I can't reproduce this by building a reference site on https://simplytest.me so the steps to reproduce this need refining.
- Issue was unassigned.
- Status changed to Active
12 months ago 7:50am 8 July 2024 - First commit to issue fork.
- ๐ฎ๐ณIndia vinmayiswamy
Hi, I followed the steps outlined in the issue summary to reproduce this issue in Drupal 10.2.8-dev (cloned from 10.2.x), using MySQL 5.7 (as MySQL 5.8 is unsupported in DDEV for arm64 architecture. Please see the error below for reference) and PHP 8.3.
$ ddev config --database=mysql:5.8 You are reconfiguring the project at /Users/vinmayi.nidubrolu/projects/drupal102x/drupal. The existing configuration will be updated and replaced. Configuring a 'drupal' project named 'drupal102x' with docroot '' at '/Users/vinmayi.nidubrolu/projects/drupal102x/drupal'. For full details use 'ddev describe'. failed to validate config: the drupal102x project has an unsupported database type/version: 'mysql:5.8', DDEV arm64 only supports the following database types and versions: mariadb: [10.1 10.2 10.3 10.4 10.5 10.6 10.7 10.8 10.11], mysql: [5.7 8.0], postgres: [9 10 11 12 13 14 15 16]
However, I am not able to reproduce the issue.
After deleting all media types as described, I revisited the nodes created with the content type that included the media field. The nodes rendered without any issues, and there were no relevant entries in the "Recent log messages."
Additionally, I checked the same scenario in Drupal 11.x with PHP 8.3 and MariaDB 10.11, and I still couldn't reproduce the issue.
It seems that this issue may not be reproducible in my current environment. Kindly please let me know if there are any additional steps or configurations that I might have missed that could help in replicating the problem.
Thanks!
- Status changed to Postponed: needs info
10 months ago 12:22am 27 August 2024 - Status changed to Active
3 months ago 7:53am 13 March 2025 - ๐ฎ๐ณIndia rajeshreeputra Pune
Steps to reproduce:
Install site with minimal profile
Install media_library, ckeditor5, field_ui module
Visitadmin/config/content/formats/add
to create new editor.
Add titleNew Editor
Select Text editor as CKEditor5
Add DrupalMedia in Toolbar as shown in Screenshot.
Update account settings atadmin/config/people/accounts/fields
clickCreate a new field
SelectFormatted text
Add labelBio
SelectText (formatted, long)
ClickContinue
- ๐บ๐ธUnited States mausolos
Confirming #12, similar behavior (I did the same steps basically but out of order).
You can also reproduce on any mature website by simply deleting all the media types and then attempting to either load an existing full text field or trying to add a new full text field to a content type.
For a clean/new site, if you go to:
~/admin/structure/mediaYou will see:
No media types available. Add media type.If you see that, then you will be able to reproduce the error, because:
~Line 149-157 of core\modules\media_library\src\MediaLibraryState.php:// The allowed media type IDs must be an array of non-empty strings. if (empty($allowed_media_type_ids) || !is_array($allowed_media_type_ids)) { throw new \InvalidArgumentException('The allowed types parameter is required and must be an array of strings.'); } foreach ($allowed_media_type_ids as $allowed_media_type_id) { if (!is_string($allowed_media_type_id) || empty(trim($allowed_media_type_id))) { throw new \InvalidArgumentException('The allowed types parameter is required and must be an array of strings.'); } }
What's even more irksome is that you can first have created the content type and the full text field, THEN add the DrupalMedia button, and then receive this error simply by going back to edit the field you already created.
The workaround for now appears to be to add a media type.
The proper user experience ought to be something like a warning, prompting you to create a media type.
This bug report will be improved by someone putting the corrected steps to reproduce into this issue summary and removing the โneeds steps to reproduceโ tag.
- ๐ฎ๐ณIndia JatinGupta40
I tried with the #12 steps and everything seems to be working fine for me.
There is no error on console or anywhere else.