Hi There,
Motivation: this is a gap to the Sector D7 govt KIT and is really important for editorial staff!
The entity usage module should get us halfway there!
https://www.drupal.org/project/entity_usage/
I would like to replicate the Sector D7 set-up:
1 - the list under /admin/content/media has a usage column, with a usage value
2 - counts should include the media upload fields and the CK editor embeds (in Sector/Drupal 7 revisions were counted as well)
3 - the usage count is linked to a list of nodes
Ta,
Heike

| Comment | File | Size | Author |
|---|---|---|---|
| #5 | Screenshot from 2020-06-30 15-08-38.png | 24.32 KB | danielveza |
| #5 | entity-usage_3150751_5.patch | 10.04 KB | danielveza |
| #3 | entity-usage_3150751_3.patch | 7.37 KB | danielveza |
Comments
Comment #2
heiket commentedComment #3
danielvezaAgreed with @HeikeTs approach with Entity usage. It's a good module that's well supported, and does what we need out of the box.
Only small thing I found is a bug/improvement where the per node reporting could be better, and I've written a patch and included that.
Drupal.org issue on the Entity Usage queue is #3151920: Entity only tracked once per Node
Comment #4
heiket commentedAlso included in this fix is: An extended error message is shown to the users when a media entity is deleted that is used, and the message is linked to the usage screen.
Ta!
Comment #5
danielvezaYep - This is done now.
If the Media entity has any usages it displayed additional help text to make it clear.
Comment #7
danielvezaPassed internal testing from @HeikeT. Committed.
Thanks!