Track media_entity_download link routes

Created on 22 July 2025, 6 days ago

Problem/Motivation

If I'm using the https://www.drupal.org/project/media_entity_download β†’ module and linking to URLs like /media/1/download, I would like those tracked as Media usage because the route name does not start with the word entity.

Steps to reproduce

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

✨ Feature request
Status

Active

Version

2.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States dave reid Nebraska USA

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

Comments & Activities

  • Issue created by @dave reid
  • @dave-reid opened merge request.
  • πŸ‡ͺπŸ‡ΈSpain marcoscano Barcelona, Spain

    Thanks for filing this.
    Things would be so much easier if Media Entity Download routes were named entity.media.download or entity.media.media_entity_download.... Is there a way to do that in a backwards-compatible way? That would be my first option, if possible.
    An alternative is to make that contrib compatible with Entity Usage ( ✨ Track the usage of Media entity through media_entity_download route with entity_usage Needs review ), instead of the other way around.
    I am not opposed to this here, but it's always a balance between adding special-cases versus trying to limit maintenance burden over time...

  • πŸ‡ΊπŸ‡ΈUnited States dave reid Nebraska USA

    Yeah, I can see if renaming the route will work, I do worry a bit about existing links that might be saved using the route name. This felt like the least friction forward to get it to work "right now"? The proposed MR in Media Entity Download actually won't work for me because I'm having to override the LinkIt and MediaEmbed plugins to support some custom field types in the project I'm working on.

Production build 0.71.5 2024