- Issue created by @crafter
- π΅π±Poland crafter
I noticed that error appear only for drupal 10.3.0 dev. When I downgrade to version without dev then feature works so I think that is not major issue.
- πΊπ¦Ukraine arialblack
Drupal 10.2.6:
InvalidArgumentException: The allowed types parameter is required and must be an array of strings. in Drupal\media_library\MediaLibraryState->validateRequiredParameters() (line 154 of /app/web/core/modules/media_library/src/MediaLibraryState.php).
#0 /app/web/core/modules/media_library/src/MediaLibraryState.php(48): Drupal\media_library\MediaLibraryState->validateRequiredParameters('media_library.o...', Array, 'image', 1) #1 /app/web/core/modules/media_library/src/MediaLibraryState.php(75): Drupal\media_library\MediaLibraryState->__construct(Array) #2 /app/web/core/modules/media_library/src/MediaLibraryUiBuilder.php(242): Drupal\media_library\MediaLibraryState::create('media_library.o...', Array, 'image', 1, Array) #3 /app/web/modules/contrib/media_library_extend/src/MediaLibraryExtendUiBuilder.php(111): Drupal\media_library\MediaLibraryUiBuilder->buildMediaTypeMenu(Object(Drupal\media_library\MediaLibraryState)) #4 /app/web/core/modules/media_library/src/MediaLibraryUiBuilder.php(125): Drupal\media_library_extend\MediaLibraryExtendUiBuilder->buildMediaTypeMenu(Object(Drupal\media_library\MediaLibraryState)) #5 /app/web/modules/contrib/media_library_form_element/src/Element/MediaLibrary.php(574): Drupal\media_library\MediaLibraryUiBuilder->buildUi(Object(Drupal\media_library\MediaLibraryState)) #6 [internal function]: Drupal\media_library_form_element\Element\MediaLibrary::openMediaLibrary(Array, Object(Drupal\Core\Form\FormState), Object(Symfony\Component\HttpFoundation\Request)) #7 /app/web/core/lib/Drupal/Core/Form/FormAjaxResponseBuilder.php(69): call_user_func_array(Array, Array) #8 /app/web/core/lib/Drupal/Core/Form/EventSubscriber/FormAjaxSubscriber.php(112): Drupal\Core\Form\FormAjaxResponseBuilder->buildResponse(Object(Symfony\Component\HttpFoundation\Request), Array, Object(Drupal\Core\Form\FormState), Array) #9 [internal function]: Drupal\Core\Form\EventSubscriber\FormAjaxSubscriber->onException(Object(Symfony\Component\HttpKernel\Event\ExceptionEvent), 'kernel.exceptio...', Object(Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher)) #10 /app/web/core/lib/Drupal/Component/EventDispatcher/ContainerAwareEventDispatcher.php(111): call_user_func(Array, Object(Symfony\Component\HttpKernel\Event\ExceptionEvent), 'kernel.exceptio...', Object(Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher)) #11 /app/vendor/symfony/http-kernel/HttpKernel.php(239): Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher->dispatch(Object(Symfony\Component\HttpKernel\Event\ExceptionEvent), 'kernel.exceptio...') #12 /app/vendor/symfony/http-kernel/HttpKernel.php(91): Symfony\Component\HttpKernel\HttpKernel->handleThrowable(Object(Drupal\Core\Form\FormAjaxException), Object(Symfony\Component\HttpFoundation\Request), 1) #13 /app/web/core/lib/Drupal/Core/StackMiddleware/Session.php(58): Symfony\Component\HttpKernel\HttpKernel->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true) #14 /app/web/core/lib/Drupal/Core/StackMiddleware/KernelPreHandle.php(48): Drupal\Core\StackMiddleware\Session->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true) #15 /app/web/core/lib/Drupal/Core/StackMiddleware/ContentLength.php(28): Drupal\Core\StackMiddleware\KernelPreHandle->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true) #16 /app/web/core/modules/page_cache/src/StackMiddleware/PageCache.php(106): Drupal\Core\StackMiddleware\ContentLength->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true) #17 /app/web/core/modules/page_cache/src/StackMiddleware/PageCache.php(85): Drupal\page_cache\StackMiddleware\PageCache->pass(Object(Symfony\Component\HttpFoundation\Request), 1, true) #18 /app/web/core/lib/Drupal/Core/StackMiddleware/ReverseProxyMiddleware.php(48): Drupal\page_cache\StackMiddleware\PageCache->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true) #19 /app/web/core/lib/Drupal/Core/StackMiddleware/NegotiationMiddleware.php(51): Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true) #20 /app/web/core/lib/Drupal/Core/StackMiddleware/AjaxPageState.php(36): Drupal\Core\StackMiddleware\NegotiationMiddleware->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true) #21 /app/web/core/lib/Drupal/Core/StackMiddleware/StackedHttpKernel.php(51): Drupal\Core\StackMiddleware\AjaxPageState->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true) #22 /app/web/core/lib/Drupal/Core/DrupalKernel.php(704): Drupal\Core\StackMiddleware\StackedHttpKernel->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true) #23 /app/web/index.php(19): Drupal\Core\DrupalKernel->handle(Object(Symfony\Component\HttpFoundation\Request)) #24 {main}