Issue when uploading an image.

Created on 22 October 2024, about 2 months ago

Problem/Motivation

I came across this issue when I upgraded Drupal core from 10.3.2 to 10.3.5. When I try to upload image it comes up with following error.

Warning: Undefined array key "data" in Drupal\Core\Asset\JsCollectionRenderer->render() (line 108 of /var/www/drupal/web/core/lib/Drupal/Core/Asset/JsCollectionRenderer.php)

#0 /var/www/drupal/web/core/includes/bootstrap.inc(166): _drupal_error_handler_real()
#1 /var/www/drupal/web/core/lib/Drupal/Core/Asset/JsCollectionRenderer.php(108): _drupal_error_handler()
#2 /var/www/drupal/web/core/lib/Drupal/Core/Ajax/AjaxResponseAttachmentsProcessor.php(185): Drupal\Core\Asset\JsCollectionRenderer->render()
#3 /var/www/drupal/web/core/lib/Drupal/Core/Ajax/AjaxResponseAttachmentsProcessor.php(117): Drupal\Core\Ajax\AjaxResponseAttachmentsProcessor->buildAttachmentsCommands()
#4 /var/www/drupal/web/core/lib/Drupal/Core/EventSubscriber/AjaxResponseSubscriber.php(66): Drupal\Core\Ajax\AjaxResponseAttachmentsProcessor->processAttachments()
#5 [internal function]: Drupal\Core\EventSubscriber\AjaxResponseSubscriber->onResponse()
#6 /var/www/drupal/web/core/lib/Drupal/Component/EventDispatcher/ContainerAwareEventDispatcher.php(111): call_user_func()
#7 /var/www/drupal/vendor/symfony/http-kernel/HttpKernel.php(214): Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher->dispatch()
#8 /var/www/drupal/vendor/symfony/http-kernel/HttpKernel.php(265): Symfony\Component\HttpKernel\HttpKernel->filterResponse()
#9 /var/www/drupal/vendor/symfony/http-kernel/HttpKernel.php(91): Symfony\Component\HttpKernel\HttpKernel->handleThrowable()
#10 /var/www/drupal/web/modules/contrib/simple_oauth/src/HttpMiddleware/BasicAuthSwap.php(68): Symfony\Component\HttpKernel\HttpKernel->handle()
#11 /var/www/drupal/web/core/lib/Drupal/Core/StackMiddleware/Session.php(53): Drupal\simple_oauth\HttpMiddleware\BasicAuthSwap->handle()
#12 /var/www/drupal/web/core/lib/Drupal/Core/StackMiddleware/KernelPreHandle.php(48): Drupal\Core\StackMiddleware\Session->handle()
#13 /var/www/drupal/web/core/lib/Drupal/Core/StackMiddleware/ContentLength.php(28): Drupal\Core\StackMiddleware\KernelPreHandle->handle()
#14 /var/www/drupal/web/core/modules/page_cache/src/StackMiddleware/PageCache.php(106): Drupal\Core\StackMiddleware\ContentLength->handle()
#15 /var/www/drupal/web/core/modules/page_cache/src/StackMiddleware/PageCache.php(85): Drupal\page_cache\StackMiddleware\PageCache->pass()
#16 /var/www/drupal/web/core/lib/Drupal/Core/StackMiddleware/ReverseProxyMiddleware.php(48): Drupal\page_cache\StackMiddleware\PageCache->handle()
#17 /var/www/drupal/web/core/lib/Drupal/Core/StackMiddleware/NegotiationMiddleware.php(51): Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle()
#18 /var/www/drupal/web/core/lib/Drupal/Core/StackMiddleware/AjaxPageState.php(36): Drupal\Core\StackMiddleware\NegotiationMiddleware->handle()
#19 /var/www/drupal/web/core/lib/Drupal/Core/StackMiddleware/StackedHttpKernel.php(51): Drupal\Core\StackMiddleware\AjaxPageState->handle()
#20 /var/www/drupal/web/core/lib/Drupal/Core/DrupalKernel.php(741): Drupal\Core\StackMiddleware\StackedHttpKernel->handle()
#21 /var/www/drupal/web/index.php(19): Drupal\Core\DrupalKernel->handle()
#22 {main}

I've figured it out that it happens only if js/css is aggregated as it wasn't happening to me locally.

Also I have noticed that it only happens if "Load AlpineJS on all pages?" in turned on in settings.

This was not an issue in version 10.3.2

🐛 Bug report
Status

Needs work

Version

3.0

Component

Code

Created by

🇬🇧United Kingdom drs2034

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

Comments & Activities

Production build 0.71.5 2024