Problem/Motivation

Full details of the error:

ArgumentCountError: Too few arguments to function Drupal\image\Plugin\Field\FieldFormatter\ImageFormatter::__construct(), 9 passed in /var/www/html/web/modules/contrib/media_pdf_thumbnail/src/Plugin/Field/FieldFormatter/MediaPdfThumbnailImageFieldFormatter.php on line 102 and exactly 10 expected in /var/www/html/web/core/modules/image/src/Plugin/Field/FieldFormatter/ImageFormatter.php on line 75

The reason for this is that Drupal 10 now has an extra parameter (the file url generator service) that is not being passed by the current code.

Proposed resolution

Instead of trying to follow core, better rely on core's constructor to do its thing and instead move all module-specific plugin construction logic to the create() function.

Remaining tasks

User interface changes

API changes

Data model changes

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

jcnventura created an issue. See original summary.

jcnventura’s picture

Status: Active » Needs review
sgostanyan’s picture

Status: Needs review » Fixed

Reviewed and merged in 5.4 release.

Thank you for contributing

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.