Provide support for Media Library Media Modify Fields

Created on 19 March 2024, 9 months ago
Updated 7 September 2024, 4 months ago

Problem/Motivation

Provide support for Media with contextual modifications fields from the Media Library Media Modify module.

The machine name of the field provided by the module is entity_reference_entity_modify
See the field plugin in the source code of the module.

Since EntityReferenceEntityModifyItem extends EntityReferenceItem we only need to add the entity_reference_entity_modify field to the list of field types in docroot/modules/contrib/entity_usage/src/Plugin/EntityUsage/Track/EntityReference.php

Attached is a patch to add support for this field type.

Steps to reproduce

Install entity usage
Install the Media Library Media Modify
Install media
Setup a content type with a field of type Media with contextual modifications to reference media
Setup entity usage, at a minimum, to track media as a target and nodes as a source
Add a new piece of media content
add a new piece of the content type you created above and reference a piece of media
Go back to your media, look at the usage and confirm it is not tracking the media from the newly created piece of content.

Proposed resolution

Apply the supplied patch.

Remaining tasks

Add test coverage for this new field type?

Feature request
Status

Fixed

Component

Code

Created by

🇺🇸United States devanbicher

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

Comments & Activities

Production build 0.71.5 2024