Error using Thumbnail styles in core image field when webprofiler is enabled

Created on 19 March 2018, over 6 years ago
Updated 2 November 2023, 10 months ago

I'm not at all sure if this should be considered a core issue or a devel issue, but it has been reported by other users in both the devel project and the video_embed_field project. Long story short, when trying to use the thumbnail style for image entities (and apparently video entities, though I didn't try that myself), while the Webprofiler module is enabled, an error like the following occurs:

Recoverable fatal error: Argument 9 passed to Drupal\\media\\Plugin\\Field\\FieldFormatter\\MediaThumbnailFormatter::__construct() must implement interface Drupal\\image\\ImageStyleStorageInterface, instance of Drupal\\webprofiler\\Entity\\Decorators\\Config\\ConfigEntityStorageDecorator given, called in /Users/foo/Sites/devdesktop/bar-dev/docroot/core/modules/media/src/Plugin/Field/FieldFormatter/MediaThumbnailFormatter.php on line 81 and defined in /Users/foo/Sites/devdesktop/bar-dev/docroot/core/modules/media/src/Plugin/Field/FieldFormatter/MediaThumbnailFormatter.php on line 61 #0 /Users/foo/Sites/devdesktop/bar-dev/docroot/core/includes/bootstrap.inc(582): _drupal_error_handler_real(4096, 'Argument 9 pass...', '/Users/foo/S...', 61, Array), referer: https://bar.dd:8443/node/add/page

As it happens, duplicating the fix used for video_embed_field does also fix the problem for the core image field. I'll provide a patch shortly -- but as I said, I'm not sure if this is the appropriate place to fix it.

πŸ› Bug report
Status

Needs work

Version

11.0 πŸ”₯

Component
MediaΒ  β†’

Last updated 1 minute ago

Created by

πŸ‡ΊπŸ‡ΈUnited States wrd

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

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024