After the update to Media and File Entity in #2920387: Update to Media 2.13 and File Entity 2.12, there's an Edit file button in the Media style selector modal, under the image preview. Its behavior in Panopoly is broken: When you use the button to edit file attributes, and then Save, the modal doesn't close but instead loads the full theme with admin toolbar etc. into the modal. The button was added by Media in #2338233: Fix replace file functionality for 'edit' in media browser.

Panopoly already hides Media edit buttons in CTools modals, in panopoly-widgets.css, because they can spawn another CTools modal, which causes the initial modal to close.

The new button is on the style selector, which is an images/media/files thing rather than a widgets thing. @dsnopek if you think it's best to fix this for now by hiding the button, until the underlying problem can be investigated, which Panopoly feature should be patched?

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

cboyden created an issue. See original summary.

cboyden’s picture

Title: Edit file button reappears on Media style selector modal » Edit file button appears on Media style selector modal
Issue summary: View changes

Updated issue summary to reflect the source of this button.

dsnopek’s picture

Component: WYSIWYG » Widgets

@dsnopek if you think it's best to fix this for now by hiding the button, until the underlying problem can be investigated, which Panopoly feature should be patched?

Yes, let's hide the button - we've taken that approach before, where we hide new features because we don't know how to handle them, and then shown them later after that's all figured out.

This should be in panopoly_widgets. In Panopoly 1.x, all the Media stuff is in panopoly_widgets, even though it's also used by panopoly_wysiwyg and other modules. In Panopoly 2.x, there's a panopoly_media where this will get separated out, but that doesn't help us here.

cboyden’s picture

Status: Active » Needs review
FileSize
453 bytes

Here's a patch that hides the button via CSS.

  • dsnopek committed f3c4a22 on 7.x-1.x
    Update Panopoly Widgets for Issue #2923210 by cboyden: Edit file button...
dsnopek’s picture

Status: Needs review » Fixed

Looks good to me, thanks! Committed :-)

Status: Fixed » Closed (fixed)

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