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.
No matter what, the 'file_display' components in any feature are always overridden. This is due to Media providing some default file displays via alter hooks out of the box. This is a bug in Media and related modules - there are some patches to fix here:
#2104193: Default file entities are not exportable by features (Media File Entity Overridden)
#2192391: Default file entities are not exportable by features (Sibling Issue)
#1863788: File display settings not exported
If this also affect media_vimeo (needs testing!) there is no patch yet.
Comment | File | Size | Author |
---|---|---|---|
#23 | panopoly_images-media-overridden-2159149-23.patch | 12.97 KB | dsnopek |
#23 | panopoly_widgets-media-overridden-2159149-23.patch | 3.95 KB | dsnopek |
#22 | panopoly-behat-media-overridden-2159149-22.patch | 5.25 KB | dsnopek |
Comments
Comment #1
dsnopekIt would be super awesome to figure this out before 1.0! However, features appearing overridden is harmless and there are some less harmless issues that need attention. :-)
Comment #2
scottalan CreditAttribution: scottalan commentedI agree they are harmless, however when you are relying of features to move between environments this can end up being a headache remembering which features you expect to be overridden and which features actually need to be updated/reverted so that you can properly version control your codebase. I did read through https://drupal.org/node/2104193 and I noticed you made a comment: https://drupal.org/comment/8286501#comment-8286501.
I've tried everything suggested here: https://drupal.org/node/2104193 and I still can't get panopoly_images or panopoly_widgets out of an overridden state with the file_display(s). Have you been successful in doing so?
Comment #3
dsnopekHi Scott! Unfortunately, I haven't had a chance to work on this since creating this issue, sorry. :-/
But it looks like there has been some progress on a patch:
#2104193: Default file entities are not exportable by features (Media File Entity Overridden)
That patch is heading in the right direction! Have you tried it? If it doesn't work, you should let them know there.
Once there is a working patch, we'd definitely consider it for inclusion in Panopoly!
Comment #4
scottalan CreditAttribution: scottalan commented@dsnopek
Yes, sorry. After I posted this I did get the patches https://drupal.org/comment/8396877#comment-8396877 to work. So far it seems to be working as expected. I'll move further comments to that issue.
Thanks again
Comment #5
dsnopekComment #6
dsnopekComment #7
dsnopekComment #8
dsnopekThe most difficult thing about this issue is going to be making sure we capture all the settings we depend on in Features after these patches go in. I'm hoping doing it in this order will work:
Comment #9
dsnopekI did the steps I described in #8, and have a patch but it's still not done: the Vimeo stuff is missing and I'm not sure what to do about the generic HTML5 video handler.
Anyway, my patch so far is attached!
Comment #10
dsnopekGah! Sorry, some junk snuck into that patch. Here's a clean one.
Comment #11
dsnopekHeh, I'm glad I didn't commit this yet! While talking with Mike Potter about this issue with Open Atrium, I realized that these patches add new hook_update_N() functions which are ahead of the current schema version of the Media which we are using.
Specifically, we have media_update_7218() but the patch adds media_update_7226(). If a user runs this update, it'll take the schema version all the way up to 7226, so when we update to a newer version of Media that adds the update functions for 7219-7225, they won't get run. :-/
So, basically, it isn't safe to use any of the patches added by this issue without first catching up to Media!
Marking as "Postponed" for now.
Comment #12
dsnopekThe media and file_entity patch just got committed upstream! This is no longer postponed, we should finally be ready to move forward with this. :-)
Comment #13
dsnopekFor reference, these are the revisions we are targeting:
media - a74c013
file_entity - 13fa2b0
Comment #14
dsnopekActually, there was a change to to Media for the Drupal 7.27 release, so we actually want to target at least:
media - b2c2d78
Comment #15
dsnopekComment #16
dsnopekSome notes about the current state of this:
I haven't tried the latest Git for several weeks, so I'm not sure what other issues might be lurking in there...
Comment #17
dsnopekComment #18
dsnopekOk, I started working on the patch from #10 again and I think it includes too much stuff. We don't have any need for the 'audio' or 'document' file displays so we should leave that to the file_entity defaults and the image stuff really belongs in panopoly_images.
So, here are new patches for panopoly_widgets and panopoly_images!
I encountered the following additional bugs in the latest Media and implemented work arounds:
The latest patches also fixes this related Panopoly issue: #2275869: Investigate: panopoly_image uses "*__file_image" rather than "*__file_field_image"
We still need to update the Behat tests for the changes in the text in the UI, for example, the "Select" button became "Browse". However, I don't see any major issues that should prevent us from updating to the latest Media!
Comment #19
dsnopekAttached is a patch that starts to update the Behat tests. Unfortunately, I didn't finish them. The video_widget.feature tests work, but not wysiwyg.feature yet.
Comment #20
dsnopekHrm, I just noticed an issue with the new Media: the live preview isn't updating with Video widgets. It seems like this was working earlier today. I suspect it has to do with updating to the latest version of this patch (which is one of the last things I did): #2126755: Improve Media's WYSIWYG Macro handling
Comment #21
dsnopekAh, you can ignore #20! That was after I started running the behat tests against my dev site and many of the Behat tests disable live previews. :-) I just tried it again after turning live previews back on, and everything worked fine!
Comment #22
dsnopekOk! Here is a patch that should get all the Behat tests working AND it starts checking all the Panopoly features to see if they're Overridden (now that everything should be in the 'Default' state').
I'm feeling really pretty confident about this! We just need to get the Media / File Entity patches committed upstream so that we know we're using the correctly numbered
hook_update_N()
functions.Comment #23
dsnopekThe File Entity and Media patches still need some work and aren't going to get committed any time soon. :-/ So, I've gone with a different approach and just altered the defaults they setup when needed. For completeness, I'm going to attach new patches (since I've been posting patches for months!). But I'm going to commit this momentarily since the tests pass and everything looks good for me!
Comment #25
dsnopekCommitted! The tests pass locally, but let's see what Travis-CI says:
https://travis-ci.org/panopoly/panopoly/builds/28113082
Comment #27
scottalan CreditAttribution: scottalan commented@dsnopek :) :) :) !!!!