Closed (fixed)
Project:
Entity Embed
Version:
7.x-2.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
22 Jul 2015 at 14:24 UTC
Updated:
3 Nov 2015 at 19:54 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
webflo commentedComment #2
dave reidHrm, are the files not getting set as a permanent file to begin with? That should have prevented this in the first place, but I agree that adding usage is good. I think this code might need to be in the Entity class itself possibly, and not in a hook.
Comment #4
webflo commentedFiles are temporary by default.
FileFieldItemList::postSavemaintains the file usage for file and image fields. I implemented it as hooks because thought it's not the concern of the entity to integrate in other subsystems.Comment #5
webflo commentedComment #6
webflo commentedThis line is not necessary. I remove it during the next reroll.
Comment #8
webflo commentedComment #10
dave reidBecause the icon is an integral part of the config entity itself and not something optional, I don't think hooks seem like something useful for this.
If this were true then the file module would be implementing hooks scanning for file and image field references for tracking usage, instead of it being part of the file and image fields themselves.
Comment #11
webflo commentedLatest patch is on GitHub https://github.com/drupal-media/entity_embed/pull/151
Comment #12
dave reidComment #15
devin carlson commentedComment #16
devin carlson commentedA backport of #13.
Comment #18
devin carlson commentedComment #20
devin carlson commentedTested #18 and committed to Entity Embed 3.x, 2.x and 1.x.