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

Murz created an issue. See original summary.

haclong99’s picture

I have the same issue
Any news ?

joseph.olstad’s picture

Status: Active » Closed (works as designed)

this 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

joseph.olstad’s picture

Status: Closed (works as designed) » Active
Murz’s picture

Seems 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 add block type and id, for keep usage link.

In file media_wysiwyg.module here are the function media_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?

Chris Matthews’s picture

Status: Active » Closed (outdated)

Recent 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