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.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

coredumperror’s picture

Title: The file_image formatter is hidden but remains enabled » The "Rendered file" formatter is hidden but remains enabled

I 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 to image__<view_mode>__file_field_image. I'm not sure how that would interact with formatter settings saved in Features, though.

coredumperror’s picture

Title: The "Rendered file" formatter is hidden but remains enabled » The file_image formatter is hidden but remains enabled

Whoops, didn't mean to change the title like that.

bennybobw’s picture

I 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.

rwohleb’s picture

Even 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.

OnkelTem’s picture

Same 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.

OnkelTem’s picture

Status: Active » Needs review
FileSize
1.23 KB

Let's do what was suggested in the Summary.