Support from Acquia helps fund testing for Drupal Acquia logo

Comments

dsnopek’s picture

Issue tags: +sprint

It 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. :-)

scottalan’s picture

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

dsnopek’s picture

Hi 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!

scottalan’s picture

@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

dsnopek’s picture

Component: Code » Admin
Issue summary: View changes
dsnopek’s picture

Issue summary: View changes
dsnopek’s picture

Component: Admin » Widgets
dsnopek’s picture

Assigned: Unassigned » dsnopek

The 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:

  1. Apply patches
  2. Do fresh install
  3. Export all Media settings to panopoly_widgets Feature
  4. Go through old *_alter() hooks and new Feature and make sure that they are all accounted for
dsnopek’s picture

Status: Active » Needs work
FileSize
10.36 KB

I 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!

dsnopek’s picture

FileSize
9.62 KB

Gah! Sorry, some junk snuck into that patch. Here's a clean one.

dsnopek’s picture

Status: Needs work » Postponed

Heh, 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.

dsnopek’s picture

Status: Postponed » Active

The media and file_entity patch just got committed upstream! This is no longer postponed, we should finally be ready to move forward with this. :-)

dsnopek’s picture

For reference, these are the revisions we are targeting:

media - a74c013
file_entity - 13fa2b0

dsnopek’s picture

Actually, there was a change to to Media for the Drupal 7.27 release, so we actually want to target at least:

media - b2c2d78

dsnopek’s picture

Title: 'file_display' components are always overridden » 'file_display' components are always overridden (update Media / File Entity)
dsnopek’s picture

Some notes about the current state of this:

  • The Media / File Entity patches that fixed this issue were reverted. I've submitted new versions of those patches. If anyone has the time to test and review them, that would be much appreciated! Links in the issue summary and "Related issues".
  • In the latest Git, Media has removed the "Edit" button - so, you can add File Entities, but not edit them. :-/ Here is a patch to restore this functionality, which I haven't tested yet: #2192981: Restore media field widget edit button

I haven't tried the latest Git for several weeks, so I'm not sure what other issues might be lurking in there...

dsnopek’s picture

dsnopek’s picture

Ok, 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!

dsnopek’s picture

Status: Needs review » Needs work
FileSize
3.32 KB

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

dsnopek’s picture

Hrm, 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

dsnopek’s picture

Ah, 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!

dsnopek’s picture

Status: Needs work » Needs review
FileSize
5.25 KB

Ok! 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.

dsnopek’s picture

The 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!

  • Commit 8008534 on 7.x-1.x by dsnopek:
    Update Panopoly Images, Widgets for #2159149: Fixed 'file_display'...
dsnopek’s picture

Status: Needs review » Fixed

Committed! The tests pass locally, but let's see what Travis-CI says:

https://travis-ci.org/panopoly/panopoly/builds/28113082

  • Commit 84c0fd8 on 7.x-1.x by dsnopek:
    Issue #2159149: Fixed 'file_display' components are always overridden (...
scottalan’s picture

@dsnopek :) :) :) !!!!

Status: Fixed » Closed (fixed)

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