Error: Call to a member function load() on null BgImgFieldFormatter

Created on 31 October 2024, 21 days ago

Problem/Motivation

On Core 10.3 I get the following errors and warnings out of the box when using this module.

Error: Call to a member function load() on null in Drupal\bg_img_field\Plugin\Field\FieldFormatter\BgImgFieldFormatter->viewElements() (line 188 of modules/contrib/bg_img_field/src/Plugin/Field/FieldFormatter/BgImgFieldFormatter.php).

Warning: Undefined variable $fileSystem in Drupal\bg_img_field\Plugin\Field\FieldFormatter\BgImgFieldFormatter->__construct() (line 117 of modules/contrib/bg_img_field/src/Plugin/Field/FieldFormatter/BgImgFieldFormatter.php).

Warning: Undefined variable $imageFactory in Drupal\bg_img_field\Plugin\Field\FieldFormatter\BgImgFieldFormatter->__construct() (line 118 of modules/contrib/bg_img_field/src/Plugin/Field/FieldFormatter/BgImgFieldFormatter.php).

Steps to reproduce

Proposed resolution

  • Fix dependency injection in BgImgFieldFormatter:
  • Resolve service loading issues
  • Improve image style handling

Remaining tasks

User interface changes

API changes

Data model changes

๐Ÿ› Bug report
Status

Active

Version

2.1

Component

Code

Created by

๐Ÿ‡บ๐Ÿ‡ธUnited States NicholasS

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

Merge Requests

Comments & Activities

Production build 0.71.5 2024