Closed (fixed)
Project:
Lost & found issues
Component:
Miscellaneous
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
25 Jan 2013 at 18:20 UTC
Updated:
9 Feb 2013 at 07:10 UTC
Jump to comment: Most recent
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.
| Comment | File | Size | Author |
|---|---|---|---|
| image_field_formatter_params_fix.patch | 548 bytes | alexrayu |
Comments
Comment #1
steveoliver commentedI'm not sure why this error doesn't show up for other themes, but it does fix the issue.
Comment #2
steveoliver commentedPushed to front-end in bf00f9b. Thanks, Alex.