The current design of the + Add Media button leverages the media browser, which has some unintended side-effects:

  • Shows all tabs, including the Views Library, which makes no sense.
  • Renders it impossible (AFAIK) to render a workflow of Upload => Edit => Return, because the modal window can't be closed independently.
  • Opens a modal inside an Overlay (if enabled), which seems pointless.

Patch coming which moves the add media items to a proper menu callback, allowing for better workflows. See also #1396490: Update the multiedit functionality, which is closely related.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

agentrickard’s picture

Status: Active » Needs work
FileSize
6.92 KB

The patch is blocked by changes in #1396490: Update the multiedit functionality, which are tangled up in this one.

Dave Reid’s picture

agentrickard’s picture

This patch needs a refactor based on #1396490: Update the multiedit functionality, in particular, the redirect statements currently assume that the multi-edit form menu item is active.

The current patch is up-to-date however.

Dave Reid’s picture

Oh hrm, let me look over this again to see how it interacts. I can make changes to multiedit stuff if necessary.

agentrickard’s picture

No need to revert the other changes. The issue is that I'm using the edit-multiple page callback in all cases, which may not be appropriate.

John Pitcairn’s picture

agentrickard’s picture

Status: Needs work » Needs review
FileSize
7.08 KB

I don't think that issue is related at all.

Anyway, here's a new patch which resolves the following issues:

  • Consistent URL for the edit and multi-edit callback.
  • Requires multiform to use plupload.
  • Proper title set on edit screen.

Status: Needs review » Needs work

The last submitted patch, 1398896-media-upload-callback.patch, failed testing.

agentrickard’s picture

Status: Needs work » Needs review
FileSize
7.08 KB

Missed a ).

Dave Reid’s picture

Status: Needs review » Needs work

So it seems that this breaks the media modal window. The redirects are changed from media/browser?fid=[selected-file:fid] to a normal page which breaks the magic that tells the modal window to close and select the file for the field.

agentrickard’s picture

Confirmed. Can probably work around this contextually.

agentrickard’s picture

Status: Needs work » Needs review
FileSize
8.63 KB

Here's a patch that does that.

Dave Reid’s picture

Assigned: Unassigned » Dave Reid
Dave Reid’s picture

Status: Needs review » Fixed

Committed #12 with modifications to modifying $form_state['redirect'], and having the file add paths live under file/add. I think having the change to an actual file/add is a great change and if someone wants to add the Media browser behavior back, then they should easily be able to do so.

http://drupalcode.org/project/media.git/commit/f69429b

Status: Fixed » Closed (fixed)

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