-
Notifications
You must be signed in to change notification settings - Fork 38
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Image files added to the "Description" field of taxonomy terms or the "Block content" field in custom blocks do not get a usage count #5016
Comments
@klonos let's try to drill this down a bit. Re "left over" usage count when a file has been uploaded via "add file" link: That's correct behavior IMO. Ironically the PR was from you. 😉 #4017 Re images inserted into custom blocks: This might need some more testing. There's an older issue that claims to have fixed that. Re image usage recording in taxonomy term description pseudo fields: that's a real problem and probably the main thing we should fix here. Currently the taxonomy module does not bother at all, but it should as it provides the field. |
You can confirm this easily:
So you basically have images added to the custom block content field, that are not added to the managed files, and do not get their usage count incremented/decreased as they are being added/removed to custom blocks. This is the exact same behavior as with the "Description" field in taxonomy terms. |
Re blocks: I wonder, why this file_usage_add fails to do the job in this case. Ah, I do have a suspicion already... Yeah, this probably also has to be done in a cleaner way. BTW: although both modules show the same (or very similar) behavior, I'm not sure yet, if we should cover both of them ( |
Agreed, if this turns out to be a completely different fix for these 2 cases, then we should split this. If it is either a fix implemented in a single place, or the same fix applied to two places, then I think that we should fix it in a single PR, in one go. |
This issue here is related to #5007
Steps To Reproduce
To reproduce the behavior:
admin/content/files
and use the "+ Add file" link to upload an image.node/add/post
)admin/content/files
) -> notice that the image usage count has now increased to 2 👍🏼admin/structure/taxonomy/tags/add
, to add a taxonomy term in the "Tags" vocabulary.Actual behavior
Image files added to the taxonomy term "Description" field or the "Block content" field in custom blocks do not get a usage count. If you add existing images, their usage count doesn't get incremented.
Expected behavior
Image files added to these fields should get their usage count added/incremented.
** Additional WTF!! 😅 **
Go back and:
At this point, novice users that do not know exactly how files and media/file entities work in Drupal/Backdrop, will wonder where that single file usage is coming from. Expected WTF?! (separate issue)
Experienced Backdrop/Drupal users will think that this usage count is coming from the file entity, so they might head there and delete the file.
admin/content/files
and use the "Delete" action on the image file.admin/structure/taxonomy/tags
).The text was updated successfully, but these errors were encountered: