Undefined array key "width" & "height"

Created on 22 September 2023, about 1 year ago
Updated 30 November 2023, 12 months ago

On a page where I use Responsive Image Formatter Link to Image Style I get the error below:

I'm on Drupal 10.1.4 with module 3.0

Kinda same error is in the Responsive Background Image formatter: https://www.drupal.org/project/bg_image_formatter/issues/3375638 🐛 Undefined array key "height" and "width" when using "Responsive Background Image" formatter Fixed

Warning: Undefined array key "width" in template_preprocess_responsive_image() (regel 209 van /home/user/domains/domain.nl/public_html/core/modules/responsive_image/responsive_image.module)
#0 /home/user/domains/domain.nl/public_html/core/includes/bootstrap.inc(164): _drupal_error_handler_real()
#1 /home/user/domains/domain.nl/public_html/core/modules/responsive_image/responsive_image.module(209): _drupal_error_handler()
#2 /home/user/domains/domain.nl/public_html/modules/contrib/responsive_image_formatter_link_to_image_style/src/Plugin/Field/FieldFormatter/ResponsiveImageFormatterLinkToImageStyleFormatter.php(259): template_preprocess_responsive_image()
#3 /home/user/domains/domain.nl/public_html/core/lib/Drupal/Core/Field/FormatterBase.php(89): Drupal\responsive_image_formatter_link_to_image_style\Plugin\Field\FieldFormatter\ResponsiveImageFormatterLinkToImageStyleFormatter->viewElements()
#4 /home/user/domains/domain.nl/public_html/core/lib/Drupal/Core/Field/Plugin/Field/FieldFormatter/EntityReferenceFormatterBase.php(76): Drupal\Core\Field\FormatterBase->view()
#5 /home/user/domains/domain.nl/public_html/core/lib/Drupal/Core/Entity/Entity/EntityViewDisplay.php(265): Drupal\Core\Field\Plugin\Field\FieldFormatter\EntityReferenceFormatterBase->view()
#6 /home/user/domains/domain.nl/public_html/core/lib/Drupal/Core/Entity/EntityViewBuilder.php(339): Drupal\Core\Entity\Entity\EntityViewDisplay->buildMultiple()
#7 /home/user/domains/domain.nl/public_html/core/lib/Drupal/Core/Entity/EntityViewBuilder.php(281): Drupal\Core\Entity\EntityViewBuilder->buildComponents()
#8 /home/user/domains/domain.nl/public_html/core/lib/Drupal/Core/Entity/EntityViewBuilder.php(238): Drupal\Core\Entity\EntityViewBuilder->buildMultiple()
#9 [internal function]: Drupal\Core\Entity\EntityViewBuilder->build()
#10 /home/user/domains/domain.nl/public_html/core/lib/Drupal/Core/Security/DoTrustedCallbackTrait.php(111): call_user_func_array()
#11 /home/user/domains/domain.nl/public_html/core/lib/Drupal/Core/Render/Renderer.php(797): Drupal\Core\Render\Renderer->doTrustedCallback()
#12 /home/user/domains/domain.nl/public_html/core/lib/Drupal/Core/Render/Renderer.php(386): Drupal\Core\Render\Renderer->doCallback()
#13 /home/user/domains/domain.nl/public_html/core/lib/Drupal/Core/Render/Renderer.php(204): Drupal\Core\Render\Renderer->doRender()
#14 /home/user/domains/domain.nl/public_html/core/lib/Drupal/Core/Template/TwigExtension.php(474): Drupal\Core\Render\Renderer->render()
#15 /home/user/domains/domain.nl/public_html/sites/default/files/php/twig/650d63219b298_field--node--field-screen_AfDGUizqMzkKd6Cksn4JBv3J7/ydR9O74-LfTLPDsDyXpN2eMXMoVBzlcUqF2aZAwSy6s.php(62): Drupal\Core\Template\TwigExtension->escapeFilter()
#16 /home/user/domains/domain.nl/vendor/twig/twig/src/Template.php(394): __TwigTemplate_3a923954e9da765b5f57df09b26320cc->doDisplay()
#17 /home/user/domains/domain.nl/vendor/twig/twig/src/Template.php(367): Twig\Template->displayWithErrorHandling()
#18 /home/user/domains/domain.nl/vendor/twig/twig/src/Template.php(379): Twig\Template->display()
#19 /home/user/domains/domain.nl/vendor/twig/twig/src/TemplateWrapper.php(40): Twig\Template->render()
#20 /home/user/domains/domain.nl/public_html/core/themes/engines/twig/twig.engine(53): Twig\TemplateWrapper->render()
#21 /home/user/domains/domain.nl/public_html/core/lib/Drupal/Core/Theme/ThemeManager.php(372): twig_render_template()
#22 /home/user/domains/domain.nl/public_html/core/lib/Drupal/Core/Render/Renderer.php(445): Drupal\Core\Theme\ThemeManager->render()
#23 /home/user/domains/domain.nl/public_html/core/lib/Drupal/Core/Render/Renderer.php(204): Drupal\Core\Render\Renderer->doRender()
#24 /home/user/domains/domain.nl/public_html/core/lib/Drupal/Core/Template/TwigExtension.php(474): Drupal\Core\Render\Renderer->render()
#25 /home/user/domains/domain.nl/public_html/sites/default/files/php/twig/650d63219b298_node--portfolio--full.htm__jljiR8Ta7J6qixMRKO6to4D3/41nmimeTNLWavImeV0OqCqa4_axA0T7hyHpLRdizbcw.php(128): Drupal\Core\Template\TwigExtension->escapeFilter()
#26 /home/user/domains/domain.nl/vendor/twig/twig/src/Template.php(394): __TwigTemplate_89350cfa1203d7ae2966c51f5aea40d0->doDisplay()
#27 /home/user/domains/domain.nl/vendor/twig/twig/src/Template.php(367): Twig\Template->displayWithErrorHandling()
#28 /home/user/domains/domain.nl/vendor/twig/twig/src/Template.php(379): Twig\Template->display()
#29 /home/user/domains/domain.nl/vendor/twig/twig/src/TemplateWrapper.php(40): Twig\Template->render()
#30 /home/user/domains/domain.nl/public_html/core/themes/engines/twig/twig.engine(53): Twig\TemplateWrapper->render()
#31 /home/user/domains/domain.nl/public_html/core/lib/Drupal/Core/Theme/ThemeManager.php(372): twig_render_template()
#32 /home/user/domains/domain.nl/public_html/core/lib/Drupal/Core/Render/Renderer.php(445): Drupal\Core\Theme\ThemeManager->render()
#33 /home/user/domains/domain.nl/public_html/core/lib/Drupal/Core/Render/Renderer.php(204): Drupal\Core\Render\Renderer->doRender()
#34 /home/user/domains/domain.nl/public_html/core/lib/Drupal/Core/Render/MainContent/HtmlRenderer.php(238): Drupal\Core\Render\Renderer->render()
#35 /home/user/domains/domain.nl/public_html/core/lib/Drupal/Core/Render/Renderer.php(592): Drupal\Core\Render\MainContent\HtmlRenderer->Drupal\Core\Render\MainContent\{closure}()
#36 /home/user/domains/domain.nl/public_html/core/lib/Drupal/Core/Render/MainContent/HtmlRenderer.php(239): Drupal\Core\Render\Renderer->executeInRenderContext()
#37 /home/user/domains/domain.nl/public_html/core/lib/Drupal/Core/Render/MainContent/HtmlRenderer.php(128): Drupal\Core\Render\MainContent\HtmlRenderer->prepare()
#38 /home/user/domains/domain.nl/public_html/core/lib/Drupal/Core/EventSubscriber/MainContentViewSubscriber.php(90): Drupal\Core\Render\MainContent\HtmlRenderer->renderResponse()
#39 [internal function]: Drupal\Core\EventSubscriber\MainContentViewSubscriber->onViewRenderArray()
#40 /home/user/domains/domain.nl/public_html/core/lib/Drupal/Component/EventDispatcher/ContainerAwareEventDispatcher.php(111): call_user_func()
#41 /home/user/domains/domain.nl/vendor/symfony/http-kernel/HttpKernel.php(187): Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher->dispatch()
#42 /home/user/domains/domain.nl/vendor/symfony/http-kernel/HttpKernel.php(76): Symfony\Component\HttpKernel\HttpKernel->handleRaw()
#43 /home/user/domains/domain.nl/public_html/core/lib/Drupal/Core/StackMiddleware/Session.php(58): Symfony\Component\HttpKernel\HttpKernel->handle()
#44 /home/user/domains/domain.nl/public_html/core/lib/Drupal/Core/StackMiddleware/KernelPreHandle.php(48): Drupal\Core\StackMiddleware\Session->handle()
#45 /home/user/domains/domain.nl/public_html/core/modules/page_cache/src/StackMiddleware/PageCache.php(106): Drupal\Core\StackMiddleware\KernelPreHandle->handle()
#46 /home/user/domains/domain.nl/public_html/core/modules/page_cache/src/StackMiddleware/PageCache.php(85): Drupal\page_cache\StackMiddleware\PageCache->pass()
#47 /home/user/domains/domain.nl/public_html/core/lib/Drupal/Core/StackMiddleware/ReverseProxyMiddleware.php(48): Drupal\page_cache\StackMiddleware\PageCache->handle()
#48 /home/user/domains/domain.nl/public_html/core/lib/Drupal/Core/StackMiddleware/NegotiationMiddleware.php(51): Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle()
#49 /home/user/domains/domain.nl/public_html/core/lib/Drupal/Core/StackMiddleware/StackedHttpKernel.php(51): Drupal\Core\StackMiddleware\NegotiationMiddleware->handle()
#50 /home/user/domains/domain.nl/public_html/core/lib/Drupal/Core/DrupalKernel.php(704): Drupal\Core\StackMiddleware\StackedHttpKernel->handle()
#51 /home/user/domains/domain.nl/public_html/index.php(19): Drupal\Core\DrupalKernel->handle()
#52 {main}
🐛 Bug report
Status

Needs review

Version

3.0

Component

Code

Created by

🇳🇱Netherlands pollegie

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

Comments & Activities

Production build 0.71.5 2024