Closed (fixed)
Project:
Workbench Media
Version:
7.x-2.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
7 Jun 2012 at 02:59 UTC
Updated:
19 Sep 2012 at 15:01 UTC
Jump to comment: Most recent file
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