Compatibility issue with the Media Library Media Modify module

Created on 19 September 2025, about 1 month ago

Problem/Motivation

When editing a media item using the edit link on a node it does not save my changes.

I found that this module and the module https://www.drupal.org/project/media_library_media_modify both define an ajax callback on the media form and based on the weight of the module which by default is alphabetical the media_library_media_modify ajax callback overwrites this modules callback.

I am posting this issue here not looking for a solution but perhaps as documentation if someone else is having issue and perhaps they have these 2 modules installed. The "Media Library Media Modify" module allows for having context added to the media reference so the we can have different say alt text for images depending on where that media is referenced. That module also provides an edit link for the media which opens the media item in a modal on the node and defines it's own ajax callback.

Steps to reproduce

In our use case we are using the new field that the module provides (Media with contextual modifications) in header of the node as we wanted to allow a different focal point crop for images if they are used for header banners. A edit icon is added by the Media Library Media Modify to edit the media. Then in the content of the node we just use the field "Entity Reference" to media and enable this module (Media Library Edit) on this media to allow for editing it from the node edit form.

This is where the link breaks as when opening the media in the modal and changing the fields and saving it does not save.

Proposed Solution

I think the real solution is when using "Media Library Media Modify" module is to always just use this module for all media fields so it uses it's own defined ajax callback and not install this module to avoid the collision.

🐛 Bug report
Status

Active

Version

3.0

Component

Documentation

Created by

🇨🇦Canada erichomanchuk

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

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

No activities found.

Production build 0.71.5 2024