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.
Currently we're using the 'media_original' in file_view_page(), when we should be using the core standard of 'full'. We need to add a 'full' view mode in file_entity_entity_info().
Remaining tasks
Open an issue on each media provider to update.
Opened so far:
Comment | File | Size | Author |
---|---|---|---|
#8 | 1291428-8.patch | 4.58 KB | effulgentsia |
#6 | 1291428-6.patch | 4.09 KB | effulgentsia |
#4 | 1291428.patch | 1.34 KB | amateescu |
Comments
Comment #1
Dave ReidComment #2
amateescu CreditAttribution: amateescu commentedJoining the Media party for a while and I'm taking this issue as my first 'victim' :)
Comment #3
effulgentsia CreditAttribution: effulgentsia commentedCross linking #1051090: Revamp file view modes: migrate media_small to teaser, media_large to full, media_preview to preview; deprecate link & original for anyone interested, but that one's gonna be a bit harder, since it will need to retain, but deprecate, existing view modes in addition to adding new ones.
Comment #4
amateescu CreditAttribution: amateescu commentedInitial patch that does only what's mentioned in the OP.
Should we also change the 'default' view mode throught the module with the new 'full' view mode in this issue/patch?
Comment #5
Dave ReidThe default parameter of file_view() should be 'full', but I don't think anything else throughout the module needs to be changed?
Comment #6
effulgentsia CreditAttribution: effulgentsia commentedUpdates some functions to default the $view_mode parameter to 'full', and removes the stray reference to 'media_preview'.
Comment #7
amateescu CreditAttribution: amateescu commentedHeh, that's what I was talking about in #4.
Comment #8
effulgentsia CreditAttribution: effulgentsia commentedYep. You were right, which prompted Dave and me to look more into it. Thanks for catching that.
No need to remove the preview entirely. We can output a link to the file. Media can then alter this into file_view_file($file, 'media_preview'). This patch fixes that.
Comment #9
Dave ReidCommitted #8 with a minor tweak to match up the default weight of $form['preview'] with file_entity_field_extra_fields().
http://drupalcode.org/project/file_entity.git/commit/f38dfa5
Thanks effulgentsia and amateescu!
Comment #10
effulgentsia CreditAttribution: effulgentsia commentedFollow-up: #1296268: Add Preview and Teaser view modes
Comment #12
nedjoThe 'custom settings' property of this view mode was set to FALSE, meaning that the view mode can't be configured. Was this intentional? If so, why? It seems that as a result the view mode is not used at file/%file and default is used instead, presumably because of the test for 'custom settings' in file_displays(). Should 'custom settings' be set to TRUE instead?
Comment #13
nedjoUpdates needed for each media provider module. Initial issues posted for media_youtube and media_vimeo.
Comment #14
Dave Reid@nedjo: View modes can be enabled to be configured on the 'Manage display' tab regardless of the boolean in hook_entity_info(). Moving back to closed (fixed).
Comment #14.0
Dave ReidUpdated issue summary.