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:

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Dave Reid’s picture

Issue tags: +Media Sprint 2011
amateescu’s picture

Assigned: Unassigned » amateescu

Joining the Media party for a while and I'm taking this issue as my first 'victim' :)

effulgentsia’s picture

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

amateescu’s picture

Status: Active » Needs review
FileSize
1.34 KB

Initial 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?

Dave Reid’s picture

The default parameter of file_view() should be 'full', but I don't think anything else throughout the module needs to be changed?

effulgentsia’s picture

FileSize
4.09 KB

Updates some functions to default the $view_mode parameter to 'full', and removes the stray reference to 'media_preview'.

amateescu’s picture

Heh, that's what I was talking about in #4.

effulgentsia’s picture

FileSize
4.58 KB

Heh, that's what I was talking about in #4.

Yep. You were right, which prompted Dave and me to look more into it. Thanks for catching that.

+++ b/file_entity.pages.inc
@@ -38,9 +38,6 @@ function file_entity_edit($form, $form_state, $file) {
-  $form['preview'] = file_view_file($file, 'media_preview');
-  $form['preview']['#weight'] = -10;
-

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.

Dave Reid’s picture

Status: Needs review » Fixed

Committed #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!

effulgentsia’s picture

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

nedjo’s picture

Status: Closed (fixed) » Active

The '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?

nedjo’s picture

Updates needed for each media provider module. Initial issues posted for media_youtube and media_vimeo.

Dave Reid’s picture

Version: 7.x-1.x-dev » 7.x-2.x-dev
Status: Active » Closed (fixed)
Issue tags: -Media Sprint 2011

@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).

Dave Reid’s picture

Issue summary: View changes

Updated issue summary.