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.
Issue #2061625: The 'Rendered file' formatter should not be available as a checkbox on the 'Manage file display' tab added code that hides the deprecated file_image formatter. However, it does nothing to handle the situation where it was already enabled. The result is that it remains enabled but there is nothing in the UI that shows it, and a user will have no idea why none of their changes are taking affect. The file_entity_file_display_form_submit() function does nothing to remove or disable formatters that are either no longer present or are hidden.
Comment | File | Size | Author |
---|---|---|---|
#6 | file_entity-file_image_formatter-2142307.patch | 1.23 KB | OnkelTem |
|
Comments
Comment #1
coredumperror CreditAttribution: coredumperror commentedI just ran into this exact issue, and it was very frustrating. It appears that a database update aught to have been implemented for the alpha2 to alpha3 upgrade, changing all the existing
image__<view_mode>__file_image
rules toimage__<view_mode>__file_field_image
. I'm not sure how that would interact with formatter settings saved in Features, though.Comment #2
coredumperror CreditAttribution: coredumperror commentedWhoops, didn't mean to change the title like that.
Comment #3
bennybobw CreditAttribution: bennybobw commentedI also ran into this issue where the file_image formatter is still enabled and lighter than file_field_image. When file_view_file is called, it takes precedence over the file_field_image formatter. I assume the easy fix is to simply disable the file_image formatter in the db.
Comment #4
rwohlebEven a simple hook_requirements() that warned the user that the deprecated file_image formatter was still enabled would be helpful. This is especially true when it has a low weight value as @bennybobw discovered. It could then link to a doc on D.O that describes how to manually fix it. This would then avoid having to mess with potentially nasty upgrade code for something that might only affect a small number of people.
Comment #5
OnkelTem CreditAttribution: OnkelTem as a volunteer commentedSame here.
I noticed that a newly created view mode (I use Display Suite for that) lacks this file_image formatter in "file_display" table, while my old view modes have it and there is no way to delete them.
Comment #6
OnkelTem CreditAttribution: OnkelTem as a volunteer commentedLet's do what was suggested in the Summary.