Problem/Motivation

On drupal 9.4.12, i have this error on page using media_directories_image_dimensions FieldFormatter:
TypeError: Drupal\media\Plugin\Field\FieldFormatter\MediaThumbnailFormatter::__construct(): Argument #10 ($renderer) must be of type Drupal\Core\Render\RendererInterface, Drupal\Core\File\FileUrlGenerator given, called in /var/www/html/web/modules/contrib/media_directories/modules/media_directories_editor/src/Plugin/Field/FieldFormatter

Proposed resolution

Here a patch to invert $file_url_generator and $renderer arguments

Comments

Raphael Apard created an issue. See original summary.

raphael apard’s picture

ytsurk’s picture

Thank you for reporting the error. We will look at it soon.

ytsurk’s picture

Status: Active » Closed (won't fix)

Looks like we're not compatible with 9.4, thus the information on the project page for 2.1.x will be changed.

We only support Drupal 9.5, see https://git.drupalcode.org/project/drupal/-/blob/9.5.x/core/modules/medi...

Sorry ..