The latest version of the Media module at this time is 7.x-2.0-beta14:

https://www.drupal.org/project/media/releases/7.x-2.0-beta14

Panopoly is currently on 7.x-2.0-beta1.

It's definitely our goal to update to the latest version of Media, however, updates in the past have been extremely error prone and caused cascading issues through many Panopoly features, so, this will need to be done carefully. Ideally, we'd create new Behat tests for any issues we find and fix (in the past, we've had to create several patchs to fix regressions when updating) so we can show that they pass on both the old and new versions.

Original summary

I just updated a Panopoly instance, and saw that Media module is still Beta 1 (current version is Beta 8). Are there any plans to update anytime soon? Beta 8 has some important improvements for a current project, but David mentioned once that Panopoly has a customized Media module included.

Thank you so much:-)
Matthias

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

mazze created an issue. See original summary.

byronveale’s picture

I'll second this notion; we're also in a similar situation for a current project (post 7.x-2.0-beta2 uses a multi-upload interface for multi-value fields).

Thanks as well…

humansky’s picture

Updating to beta10. I removed all the unnecessary patches that have already been fixed since beta1, except for one updated version of the patch for issue #2534724-105: Browser window opens twice for field image.

humansky’s picture

Assigned: Unassigned » humansky
Status: Active » Needs review
humansky’s picture

FileSize
1.02 KB

Renaming patch file in order to work with the "create_test_branch.py" script

cboyden’s picture

Status: Needs review » Needs work

After applying this patch to update Media to 2.0-beta10, the file fields on the image widget and video widget no longer work. The Media browser modal opens up behind the CTools modal. There's no way to move the CTools modal, so you have to close it in order to see the Media modal. At that point you can upload an image, but there's no way to actually add the image in a widget once you've dismissed the CTools modal.

The tests actually pass on Firefox, because Firefox on Selenium is able to click all the necessary links and buttons in the hidden modal! The tests don't pass if you run them on Chrome.

Also, see #1792738: Allow custom file view modes for WYSIWYG display, comment 222: There was an issue introduced in 2.0-beta8 that needs to be addressed. I don't see a beta12 release yet, but once that's done, the patch should be updated.

cboyden’s picture

Status: Needs work » Needs review
FileSize
1.13 KB

The stacked dialogs problem is noted in #2272567: Media dialog appears underneath the Ctools modal dialog when using jQuery UI 1.10. There was a fix that was committed, then reverted, but there seems to be consensus on the latest patch in comment 32.

New patch updates to beta13 and adds the Media patch for the stacked dialogs.

cboyden’s picture

See also #1397370: Make modal.js use jQuery dialog, which proposes to use replace the CTools modal with the jQuery UI modal. This would fix the stacking problems noted in #2272567: Media dialog appears underneath the Ctools modal dialog when using jQuery UI 1.10.

If that doesn't get any traction, Panopoly could tweak the z-indexes of the jQuery UI modals. Setting them at 1001 should work for this case. If that's too disruptive, maybe add something to the release notes and let people know they should adjust the z-indexes in their themes.

dsnopek’s picture

Title: Any plans for updating media module? » Update Media module to 7.x-2.0-beta14
Issue summary: View changes

It's definitely our goal to update to the latest version of Media, however, updates in the past have been extremely error prone and caused cascading issues through many Panopoly features, so, this will need to be done carefully. Ideally, we'd create new Behat tests for any issues we find and fix (in the past, we've had to create several patches to fix regressions when updating) so we can show that they pass on both the old and new versions.

I've updated the issues summary and title to reflect this!

@cboyden: Thanks for starting this work!

dsnopek’s picture

Re #8: I'm not sure we can include #1397370: Make modal.js use jQuery dialog in Panopoly, unless it's reworked to be optional somehow. It'd likely break any custom or contrib customizations of the CTools dialog. I'd rather do something along the lines of what we've done in the past, which is messing with the z-index.

ndeet’s picture

Seems that beta-8 until beta-11 had some security issue. See https://www.drupal.org/project/media/releases/7.x-2.0-beta12

So beta1 is not affected. Slightly OT: Unfortunately Drupal nevertheless marks it as important security update which makes some customers feel uneasy. Sure we can use hook_projects_alter() to hide it but I would want to avoid that. Is there any way that media module can mark specific versions vulnerable or is there only a check for the latest version?

cboyden’s picture

@dsnopek, the patch in #1397370: Make modal.js use jQuery dialog isn't supposed to change any existing modals, assuming it hasn't accidentally made changes to the CTools modal itself. It adds an option for CTools modals to use the jQuery modal code, but any modal would have to be built to take advantage of the option. So for Panopoly's purposes, we'd also have to patch the Panels IPE. That seems unlikely to fly, even if the patch is accepted into CTools.

In order to mess with the z-index, we'd either have to set jQuery's ui-front z-indexes to 1001 in Panopoly's stylesheet, which might break other things, or set the CTools modal z-index to 100. Because CTools adds its z-indexes in the style attribute of the modal element, we can't do that in CSS. We'd have to patch CTools. There's also the issue of navbar and admin menu, both of which set very high z-indexes that can cause them to obscure the top part of the CTools modal when it has a lower z-index. Media modals aren't affected right now because they are smaller and lower on the page.

dsnopek’s picture

Category: Support request » Task
FileSize
279 bytes

In order to mess with the z-index, we'd either have to set jQuery's ui-front z-indexes to 1001 in Panopoly's stylesheet, which might break other things, or set the CTools modal z-index to 100.

I think we should do the former, because it's more-or-less what we're doing in current Panopoly anyway.

We're on media 2.0-beta1 which includes #2272567-1: Media dialog appears underneath the Ctools modal dialog when using jQuery UI 1.10's patch on comment #1, which adds this code:

.ui-front {
  z-index: 10001 !important;
}

I say we just put that in panopoly_core's panopoly-jquery-ui-theme.css.

While this change could break things on sites that aren't expecting it, for Panopoly sites it's just maintaining the current status quo.

Here's a patch for panopoly_core to do that.

dsnopek’s picture

Now that #2765427: Fix tests and 'drush' installation with Drupal 7.50 and greater is fixed, we can run the tests on Travis! Here's a test build for the last set of patches which passed:

https://travis-ci.org/panopoly/panopoly/jobs/185560194

I also did some manual testing, and found some minor issues. There were some update hooks, but they don't appear to affect anything in any of our Features, so we shouldn't need any updates for that.

Here's some new patches that:

  • Fixes some PHP warnings when adding an image in the WYSIWYG due to a hook in panopoly_images
  • Fixes the alignment of the title in the modal
  • Updates media to the current latest version
  • Updates file_entity as well (usually we update these in tandem)

I'll run this on Travis soon as well

EDIT: Here's the build on Travis https://travis-ci.org/panopoly/panopoly/jobs/185570095

dsnopek’s picture

Assuming this passes automated testing, what this needs is lots and lots of manual testing. If anyone has time to help with that, that'd be really great!

mpotter’s picture

Title: Update Media module to 7.x-2.0-beta14 » Update Media module to 7.x-2.0-rc1

Updating title. Patch in #14 for panopoly_widgets needs to be updated.

Also, given RC1 I wonder if they are close to a stable release that would be worth waiting for. Might be worth contacting the maintainers.

Steve Hanson’s picture

Media page says that they will release 2.0 final "first half of 2017" -- which doesn't sound like real soon now.

dsnopek’s picture

Title: Update Media module to 7.x-2.0-rc1 » Update Media module to 7.x-2.0-rc2
FileSize
1.21 KB

... and now -rc2! Here's a new patch. I'll run the tests in a moment

EDIT: Here's the Travis build: https://travis-ci.org/panopoly/panopoly/builds/188968375

dsnopek’s picture

#2842446: Media widget that gets AJAX reloaded will stop working was discovered in testing! Here's a new patch that includes the fix to that

EDIT: Here's the Travis build: https://travis-ci.org/panopoly/panopoly/builds/190758787

dsnopek’s picture

Title: Update Media module to 7.x-2.0-rc2 » Update Media module to 7.x-2.0-rc3
FileSize
1.23 KB

... and now there is -rc3! Updating patch

EDIT: Here's the Travis build: https://travis-ci.org/panopoly/panopoly/builds/192515420

dsnopek’s picture

FileSize
1.2 KB

Did some manual testing on #2534724: Browser window opens twice for field image and it turns out that the patch there is no longer necessary. So, here's a new update patch that unravels that situation!

EDIT: Here's the Travis build: https://travis-ci.org/panopoly/panopoly/builds/192856771

dsnopek’s picture

FileSize
1.19 KB

Updated patch for new patch on #2842446-15: Media widget that gets AJAX reloaded will stop working. Let's see how the tests treat it!

EDIT: Here's the Travis build: https://travis-ci.org/panopoly/panopoly/builds/194987524

  • dsnopek committed 8de1a7a on 7.x-1.x
    Update Panopoly Core, Widgets and Images for Issue #2828987 by dsnopek,...
dsnopek’s picture

Status: Needs review » Fixed

Testing has been looking good, so, committed! If anyone here has time to do some additional testing before we do the next release, that'd be much appreciated :-) Thanks, everyone!

candelas’s picture

I can test at the end of next week.

They have 2 new releases, just in case you see something that affects Panopoly
https://www.drupal.org/project/media/releases/7.x-2.0-rc4
https://www.drupal.org/project/media/releases/7.x-2.0-rc5

dsnopek’s picture

Thanks!

They have 2 new releases, just in case you see something that affects Panopoly

Ugh. So, I think we should make a new issue for updating to 7.x-2.0-rc5, and just push forward on testing of what's committed so there's a chance of ever getting this out. :-) If we update again, we'll either find more problems, or not find them... until later! and this will keep stretching on for infinity

Steve Hanson’s picture

I have been doing some limited testing of the current dev on 2 sites and so far all looks fine.

  • dsnopek committed 8de1a7a on 8.x-2.x
    Update Panopoly Core, Widgets and Images for Issue #2828987 by dsnopek,...

Status: Fixed » Closed (fixed)

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