I started getting error with displaying and embedding images. I was able to get my images working by switching my display to image instead of responsive image. But responsive images still throws error when used as display option.
Env:

  • Drupal 8.7.3
  • PHP 7.2

Note: This is on a multisite, not sure if this could be the problem.

The website encountered an unexpected error. Please try again later.
Error: Call to a member function getDerivativeExtension() on null in responsive_image_get_mime_type() (line 527 of core/modules/responsive_image/responsive_image.module).

responsive_image_get_mime_type('d08', 'jpg') (Line: 425)
_responsive_image_build_source_attributes(Array, Object, Array) (Line: 195)
template_preprocess_responsive_image(Array, 'responsive_image', Array) (Line: 287)
Drupal\Core\Theme\ThemeManager->render('responsive_image', Array) (Line: 437)
Drupal\Core\Render\Renderer->doRender(Array, ) (Line: 195)
Drupal\Core\Render\Renderer->render(Array) (Line: 501)
Drupal\Core\Template\TwigExtension->escapeFilter(Object, Array, 'html', NULL, 1) (Line: 66)
__TwigTemplate_5911223cd0e652bf8294e9591dc6a33d74759791a9a290e078006c7dcd972c60->doDisplay(Array, Array) (Line: 455)
Twig\Template->displayWithErrorHandling(Array, Array) (Line: 422)
Twig\Template->display(Array) (Line: 434)
Twig\Template->render(Array) (Line: 64)
twig_render_template('core/modules/responsive_image/templates/responsive-image-formatter.html.twig', Array) (Line: 384)
Drupal\Core\Theme\ThemeManager->render('responsive_image_formatter', Array) (Line: 437)
Drupal\Core\Render\Renderer->doRender(Array, ) (Line: 195)
Drupal\Core\Render\Renderer->render(Array) (Line: 501)
Drupal\Core\Template\TwigExtension->escapeFilter(Object, Array, 'html', NULL, 1) (Line: 103)
__TwigTemplate_818f1c74e6830d5fac52ec0a741e78e956bbe83d0297894cc3f4027ed73f828a->doDisplay(Array, Array) (Line: 455)
Twig\Template->displayWithErrorHandling(Array, Array) (Line: 422)
Twig\Template->display(Array) (Line: 434)
Twig\Template->render(Array) (Line: 64)
twig_render_template('themes/custom/detroitmi/templates/field/field.html.twig', Array) (Line: 384)
Drupal\Core\Theme\ThemeManager->render('field', Array) (Line: 437)
Drupal\Core\Render\Renderer->doRender(Array) (Line: 450)
Drupal\Core\Render\Renderer->doRender(Array, ) (Line: 195)
Drupal\Core\Render\Renderer->render(Array) (Line: 501)
Drupal\Core\Template\TwigExtension->escapeFilter(Object, Array, 'html', NULL, 1) (Line: 63)
__TwigTemplate_87064ab891a454555b0c1d31886f22f6df24e98d20da152dc7926d5bd829c2fe->doDisplay(Array, Array) (Line: 455)
Twig\Template->displayWithErrorHandling(Array, Array) (Line: 422)
Twig\Template->display(Array) (Line: 434)
Twig\Template->render(Array) (Line: 64)
twig_render_template('themes/custom/detroitmi/templates/media/media--image--full.html.twig', Array) (Line: 384)
Drupal\Core\Theme\ThemeManager->render('media', Array) (Line: 437)
Drupal\Core\Render\Renderer->doRender(Array, ) (Line: 195)
Drupal\Core\Render\Renderer->render(Array, ) (Line: 226)
Drupal\Core\Render\MainContent\HtmlRenderer->Drupal\Core\Render\MainContent\{closure}() (Line: 582)
Drupal\Core\Render\Renderer->executeInRenderContext(Object, Object) (Line: 227)
Drupal\Core\Render\MainContent\HtmlRenderer->prepare(Array, Object, Object) (Line: 117)
Drupal\Core\Render\MainContent\HtmlRenderer->renderResponse(Array, Object, Object) (Line: 90)
Drupal\Core\EventSubscriber\MainContentViewSubscriber->onViewRenderArray(Object, 'kernel.view', Object)
call_user_func(Array, Object, 'kernel.view', Object) (Line: 111)
Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher->dispatch('kernel.view', Object) (Line: 156)
Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object, 1) (Line: 68)
Symfony\Component\HttpKernel\HttpKernel->handle(Object, 1, 1) (Line: 57)
Drupal\Core\StackMiddleware\Session->handle(Object, 1, 1) (Line: 47)
Drupal\Core\StackMiddleware\KernelPreHandle->handle(Object, 1, 1) (Line: 191)
Drupal\page_cache\StackMiddleware\PageCache->fetch(Object, 1, 1) (Line: 128)
Drupal\page_cache\StackMiddleware\PageCache->lookup(Object, 1, 1) (Line: 82)
Drupal\page_cache\StackMiddleware\PageCache->handle(Object, 1, 1) (Line: 49)
Asm89\Stack\Cors->handle(Object, 1, 1) (Line: 47)
Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle(Object, 1, 1) (Line: 52)
Drupal\Core\StackMiddleware\NegotiationMiddleware->handle(Object, 1, 1) (Line: 23)
Stack\StackedHttpKernel->handle(Object, 1, 1) (Line: 693)
Drupal\Core\DrupalKernel->handle(Object) (Line: 19)

Comments

jedgar1mx created an issue. See original summary.

jedgar1mx’s picture

Issue summary: View changes
abu-zakham’s picture

I think this issue related to varbase profile, I had the same problem, I've fix it by visiting "admin/config/media/responsive-image-style/d10" and update the image style.

abu-zakham’s picture

In your case you have to update styles in admin/config/media/responsive-image-style/d08

dspachos’s picture

I can confirm that the issue is related to the varbase module. Weird thing is that I get the error in just one page, but the page doesn't use (or have) this style somewhere. As a temp solution (since the upgrade in admin/config/media/responsive-image-style/d08 doesn't work for me), I patched the responsive_image module (not sure if this is the best practice though)

rajab natshah’s picture

Project: Drupal core » Varbase Media
Version: 8.7.x-dev » 8.x-7.x-dev
Component: responsive_image.module » Code

Thank you Edgar, dspachos for reporting, and Abu-Zakham for reporting back :)

Moved the issue to Varbase Media

It could be that because we do have only the fallback options for d08 in the responsive image config.

abu-zakham’s picture

@dspachos I think you should re-check all responsive image styles and set the value for all enabled breakpoints, In the error message "d08" doesn't referrer to responsive image style, it's referrer to image styles used in the responsive image style, check Edge-to-Edge* responsive image styles, I had the same problem again, after debugging I've noticed that problem in "Display Edge-to-Edge responsive standard 16:9 (de2e_standard)".

rajab natshah’s picture

Status: Active » Closed (outdated)