Fix dependency injection error for getStorage()

Created on 25 July 2024, about 1 month ago
Updated 10 August 2024, 29 days ago

Problem/Motivation

The website encountered an unexpected error. Try again later.

Error: Call to a member function getStorage() on null in Drupal\media_entity_download\Plugin\Field\FieldFormatter\DownloadLinkFieldFormatter->viewElements() (line 105 of modules/contrib/media_entity_download/src/Plugin/Field/FieldFormatter/DownloadLinkFieldFormatter.php).

This error happens for download links. The issue seems to be because of a faulty dependency injection implementation. Fixed in the attached patch.

Steps to reproduce

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

๐Ÿ› Bug report
Status

Postponed: needs info

Version

2.3

Component

Code

Created by

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