Not sure where this goes.

On /user page, stark has an error:

Warning: Missing argument 7 for image_field_formatter_view(), called in E:\wamp\www\drupal_8_twig_sandbox\core\modules\field\lib\Drupal\field\Plugin\field\formatter\LegacyFormatter.php on line 114 and defined in image_field_formatter_view() (line 537 of core\modules\image\image.field.inc).
Notice: Undefined variable: display in image_field_formatter_view() (line 541 of core\modules\image\image.field.inc).
Notice: Undefined variable: display in image_field_formatter_view() (line 544 of core\modules\image\image.field.inc).
Notice: Undefined variable: display in image_field_formatter_view() (line 558 of core\modules\image\image.field.inc).

This brings me to how core\modules\field\lib\Drupal\field\Plugin\field\formatter\LegacyFormatter.php on line 114 calls image_field_formatter_view. There is an extra first argument $entity_type, required in current image_field_formatter_view in core/modules/image/image.field.inc on line 537. This argument is not specified with standard D8's LegacyFormatter.php, and raises an error.

It appears, that $entity_type is not used anyway, and if needed, can be gotten from the $entity's entityType easily. This patch removes the unneeded argument.

CommentFileSizeAuthor
image_field_formatter_params_fix.patch548 bytesalexrayu

Comments

steveoliver’s picture

Title: image_field_formatter_view » Missing argument 7 for image_field_formatter_view()
Status: Needs review » Reviewed & tested by the community

I'm not sure why this error doesn't show up for other themes, but it does fix the issue.

steveoliver’s picture

Status: Reviewed & tested by the community » Fixed

Pushed to front-end in bf00f9b. Thanks, Alex.

Status: Fixed » Closed (fixed)

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

Project: » Lost & found issues

This issue’s project has disappeared. Most likely, it was a sandbox project, which can be deleted by its maintainer. See the Lost & found issues project page for more details. (The missing project ID was 1750250)