Track nodes using (via WYSIWYG media embeds) a media entity

Created on 27 December 2024, 3 months ago

Problem/Motivation

On a site where media entities (mostly images) are used via WYSIWYG embeds in content (nodes), it would be helpful to be able to use this module to check whether a given media entity is unused/orphaned.

That's if this use case isn't considered outside the module's intended scope, of course!

Currently the module seems able to display which media entities a given node is using via WYSIWYG embeds, but I've not been able to successfully get it to display which nodes are using a given media entity.

Please let me know if I've missed a configuration step (those I've performed are noted below), or if this use-case is intentionally outside this module's intended scope.

Steps to reproduce

  1. Ensure modules Media and Media Library are both enabled
  2. For the relevant format (e.g. Basic HTML), ensure Embed media filter is enabled and Drupal Media is in the active toolbar (in place of Image) for CKEditor 5
  3. For a relevant content type (e.g. Basic page) and a relevant media type (e.g. Image), ensure Entity Usage (light) is enabled
  4. For a relevant content type (e.g. Basic page), ensure a relevant media type (e.g. Image) is selected as a detectable entity type
  5. For a relevant media type (e.g. Image), ensure a relevant content type (e.g. Basic page) is selected as a detectable entity type
  6. Create content of the content type and use the WYSIYG editor to embed media of the content type
  7. On the Usage page of the content, observe the embeded media is listed
  8. On the Usage page of the media, observe the content which embedded this media is not listed

NB: for my testing, starting with a fresh Drupal 10.4.0 site, the content type was Basic page and the media type was Image.

Proposed resolution

If possible (and if not already supported with correct configuration or outside this module's intended scope), please support displaying the nodes (content) which embed (including via WYSIWYG embeds) a given media entity on its Usage tab (where a site admin has set appropriate configuration).

💬 Support request
Status

Active

Version

2.0

Component

User interface

Created by

🇬🇧United Kingdom rfdparker

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

Comments & Activities

Production build 0.71.5 2024