Clicking on the "upload media" link has resulted in a blank form since #1552988: Move file/add from media to file was committed.
I believe a number of paths and function names will have to be updated to get the upload media functionality working again. These changes are only required when using Media 1.x, so #1394148: Create a 7.x-2.x branch of Workbench Media to integrate with Media 7.x-2.x blocks this issue.
| Comment | File | Size | Author |
|---|---|---|---|
| #7 | 1620096-fix-for-2x.patch | 2.34 KB | dave reid |
| #6 | accommodate-changes-to-file-add-1620096-6.patch | 1.91 KB | devin carlson |
| #3 | accommodate-changes-to-file-add-1620096-3.patch | 1.02 KB | devin carlson |
| #1 | accommodate-changes-to-file-add-1620096-1.patch | 1.65 KB | devin carlson |
Comments
Comment #1
devin carlson commentedA patch to accommodate the changes made to file/add in Media and File entity.
I couldn't get the upload media form to work by simply changing all of the paths and function names from the old Media values to the new File entity values, so I replaced the Workbench Media form callback for adding media wrapper function with a simple
hook_form_alter(). An existing comments suggests avoiding a form_alter but I can't see the issue with doing so.Comment #2
devin carlson commentedThis will end up redirecting the user to the Workbench Media page in all cases. I think this my original issue with not being able to get the module to work after changing all of the file paths and function names may be the result of #1620030: managed_file file extension validation issues.
I'll do some further testing.
Comment #3
devin carlson commentedA patch to only change the values which were affected by the file/add move.
Comment #4
devin carlson commentedAs I suspected, the patch in #3 works but uploading a file is failing with a validation error due to #1620030: managed_file file extension validation issues.
Comment #5
bobodrone commented@Devin: How did you get it to work?
* I'm running Drupal 7.14
* I'm running file_entity 2.x-dev and media 2.x-dev.
* I've applied your patch here for workbench_media
* I've applied the (a D7 version) of the patch found here: http://drupal.org/node/1620030 (managed_file file extension validation issues)
But I still get the weird message: "Upload a new file field is required." when Im trying to upload an image trough wb media.
Any idea?
/ bobodrone (NodeOne, Sweden)
Comment #6
devin carlson commented@bobodrone, I couldn't get this working using either of the previous patches.
Since I haven't been able to track down the cause of the issue with #3, I've switched to using a modified version of #1 which only handles redirection if the user arrives at the file/add page via the media/add page.
Comment #7
dave reidThis is actually the easiest change to make and simplifies the code a lot.
From http://drupal.org/node/1294132#comment-6438240:
Comment #8
dave reidTested and confirmed #7 for Media 2.x works as expected. Committed to 7.x-2.x.
http://drupalcode.org/project/workbench_media.git/commit/4537f22