0

This is a issue I am dealing with for days. It looks like is related to: https://drupal.org/node/1702700

I've created a feature relying on media, file_entity and media_youtube, vimeo... whose main purpose is to embed youtube, vimeo videos etc.

I've correctly set up the file_entity displays weights: Structure » File types » Video » Manage file display so that the thumbnails shows ok

    e.g 
    "Large filetype icon"   weight: 50 
    "Youtube Image Preview" weight: -40.
    {GOOD}

enter image description here

After complete feature export,
"Large filetype icon" weight: 0 
"Youtube Image Preview" is set 2.
{WRONG}

I even edited manually the feature's .info and default_displays.inc file with no luck.

Secondly, there are also feature overrides unable to revert. It looks like somethings alters the file display weights.

1
  • This is the issue: drupal.org/node/1858370 No progress currently. I have the same problem. Will look more in to this later.
    – mikzalais
    Jan 9, 2014 at 14:01

1 Answer 1

0

The problems comes from the heart of Media module which programatically add default overrides.

I have managed to solve the problem in 2 steps: (1) Sunk the Media Icon to the bottom

apply a patch to Media module:

--- sites/all/modules/contributed/media/media.module
+++ sites/all/modules/contributed/media/media.module
@@ -1082,7 +1082,7 @@
   $file_display = new stdClass();
   $file_display->api_version = 1;
   $file_display->name = 'video__preview__file_field_media_large_icon';
-  $file_display->weight = 0;
+  $file_display->weight = 50;
   $file_display->status = TRUE;
   $file_display->settings = '';
   $file_displays['video__preview__file_field_media_large_icon'] = $file_display;
@@ -1093,7 +1093,7 @@
   $file_display = new stdClass();
   $file_display->api_version = 1;
   $file_display->name = 'audio__preview__file_field_media_large_icon';
-  $file_display->weight = 0;
+  $file_display->weight = 50;
   $file_display->status = TRUE;
   $file_display->settings = '';
   $file_displays['audio__preview__file_field_media_large_icon'] = $file_display;
@@ -1104,7 +1104,7 @@
   $file_display = new stdClass();
   $file_display->api_version = 1;
   $file_display->name = 'document__preview__file_field_media_large_icon';
-  $file_display->weight = 0;
+  $file_display->weight = 50;
   $file_display->status = TRUE;
   $file_display->settings = '';
   $file_displays['document__preview__file_field_media_large_icon'] = $file_display;

(2) I exported my feature but manually edited the File Display like this:

YOURFEATURE.features.field.inc

For Default the order is

Vimeo 
Vimeo Preview 
Youtube 
Youtube Preview

For Preview the order is

Vimeo Preview 
Vimeo 
Youtube Preview
Youtube 

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.