Closed (fixed)
Project:
D7 Media
Version:
7.x-2.x-dev
Component:
Code
Priority:
Normal
Category:
Task
Assigned:
Reporter:
Created:
9 Jan 2012 at 19:06 UTC
Updated:
15 Feb 2012 at 17:30 UTC
Jump to comment: Most recent file
The current design of the + Add Media button leverages the media browser, which has some unintended side-effects:
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.
| Comment | File | Size | Author |
|---|---|---|---|
| #12 | 1398896-media-upload-callback.patch | 8.63 KB | agentrickard |
| #9 | 1398896-media-upload-callback.patch | 7.08 KB | agentrickard |
| #7 | 1398896-media-upload-callback.patch | 7.08 KB | agentrickard |
| #3 | 1398896-media-upload-callback.patch | 5.89 KB | agentrickard |
| #1 | 1398896-media-upload-callback.patch | 6.92 KB | agentrickard |
Comments
Comment #1
agentrickardThe patch is blocked by changes in #1396490: Update the multiedit functionality, which are tangled up in this one.
Comment #2
dave reidRelated: #1238298: Follow up to Media admin 'Add file' button does not work without JavaScript
Comment #3
agentrickardThis 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.
Comment #4
dave reidOh hrm, let me look over this again to see how it interacts. I can make changes to multiedit stuff if necessary.
Comment #5
agentrickardNo 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.
Comment #6
johnpitcairn commentedPossibly also related: #1241976: Mention the File Entity Revisions module in the projects page as a companion module. ?
Comment #7
agentrickardI don't think that issue is related at all.
Anyway, here's a new patch which resolves the following issues:
Comment #9
agentrickardMissed a ).
Comment #10
dave reidSo 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.
Comment #11
agentrickardConfirmed. Can probably work around this contextually.
Comment #12
agentrickardHere's a patch that does that.
Comment #13
dave reidComment #14
dave reidCommitted #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