Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
When I insert Media item into node body - it increase file usage counter normally. But when I insert Media item into block body, file usage counter is not increased, so it stays zero and file will be cleaned up.
Is there any ways to fix this exists?
Comments
Comment #2
haclong99 CreditAttribution: haclong99 commentedI have the same issue
Any news ?
Comment #3
joseph.olstadthis is likely due to some changes in the file_entity module
#2877875: Exclude multiple-usages from file usage Views field
commit cf69d99182d844bb4150545f5524208caf611ed2
Author: danph
Date: Sat May 20 15:21:11 2017 -0400
Issue #2877875 by dpi, joseph.olstad, jibran: Exclude multiple-usages from file usage Views field
Comment #4
joseph.olstadComment #5
MurzSeems that Block is not independent entity in Drupal 7.x, so file usage can't reference to it like to node or other entity type. But in
file_usage
` table we can manually addblock
type and id, for keep usage link.In file
media_wysiwyg.module
here are the functionmedia_wysiwyg_filter_fields_with_text_filtering
that accepts only entity types, so it must fails with block. Maybe we can add workaround for block edit forms, that will force save file_usage directly without full entity analysis process?Comment #6
Chris Matthews CreditAttribution: Chris Matthews as a volunteer commentedRecent versions of media have resolved most of peoples concerns and is compatible with entity translation, multilingual and various advanced configurations. Due to the high volume of inactive and most often irrelevant issues we are Closing this as (outdated). If for whatever reason this issue is important to you AND you still have issues after checking the media recipe documentation, then let us know and we will review your concerns.
Otherwise, see the recipe documentation for how to configure media and for troubleshooting tips OR refer to the media_dev distribution if you want to see a working media setup.
As mentioned, feel free to make some noise in this issue if you still feel it is important to you or someone else.
Thanks,
Media team