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.
It would cause recursion and doesn't make much sense to provide.
Comment | File | Size | Author |
---|---|---|---|
#14 | media-removeformatter-2061625-14.patch | 1.57 KB | Devin Carlson |
#12 | media-removeformatter-2061625-12.patch | 2.83 KB | Devin Carlson |
#7 | media-removeformatter-2061625-7.patch | 682 bytes | hoersche |
#5 | media-removeformatter-2061625-5.patch | 1.3 KB | hoersche |
#3 | media-removeformatter-2061625-3.patch | 1.21 KB | hoersche |
Comments
Comment #1
hoersche CreditAttribution: hoersche commentedquick unset? [first patch!]
Comment #2
Devin Carlson CreditAttribution: Devin Carlson commentedAn unset should do the trick!
I just noticed a few things that could be cleaned up:
The comment should follow Drupal commenting standards and there is extra whitespace after the semicolon.
Extra code added by Drush.
Extra code added by Drush.
Comment #3
hoersche CreditAttribution: hoersche commentedOK, trying again. Changed as suggested.
Comment #5
hoersche CreditAttribution: hoersche commentedOops. set EOL to Unix.
Comment #6
mirzu CreditAttribution: mirzu commentedinfo file has two new lines and the test file has none. split the difference :)
Comment #7
hoersche CreditAttribution: hoersche commentedDone did it.
Comment #8
mirzu CreditAttribution: mirzu commentedPatch works as advertised. Removes the Rendered file mode from the file display options.
Comment #9
Dave ReidI would actually love if we could use hook_field_formatter_info_alter() to add some kind of boolean 'flag' to indicate 'do not allow this formatter to be used a field formatter' so that other modules could do the same thing.
Comment #10
Dave ReidActually, file_entity provides this formatter, so it's just a matter of adding a boolean flag to file_entity_field_formatter_info() and then checking for that flag in each $formatter variable in file_entity_file_display_form().
Comment #11
Dave ReidAnother task is if you've already configured your file display to use 'Rendered file', does applying this patch cause your file field to not display properly anymore?
Comment #12
Devin Carlson CreditAttribution: Devin Carlson commentedA patch to implement the changes described in #10.
I made the check in
file_entity_file_formatter_info()
a bit more "complex" in order to keep the boolean's key inhook_field_formatter_info()
simple (vs. something like'is_not_a_file_formatter' => TRUE,
).Comment #13
hoersche CreditAttribution: hoersche commentedconfirmed that 'Rendered file' is no longer an option on admin/structure/file-types/--type--/file-display after patch in #12
Comment #14
Devin Carlson CreditAttribution: Devin Carlson commentedUnfortunately, #12 makes the formatter unavailable in addition to hiding it from the UI.
A patch to just hide the formatter from the UI. It also hides the deprecated file entity image formatter since #2061531: Double 'Image' file formatter in the 'Manage file display' tab has been fixed.
Comment #15
Dave ReidTweaked and committed #14 to 7.x-2.x! LAST ALPHA BLOCKER DONE.
http://drupalcode.org/project/file_entity.git/commit/f986ae3