After this commit (found via git bisect, issue #1399098: The WYSIWYG plugin does not respect File directory path, what options do we have?), if a site doesn't have a value set for wysiwyg_upload_directory, at some point when transitioning between PHP and js and back to PHP, the null returned by media_variable_get() is transformed into a string, resulting in the inability to properly upload files via the media browser:
File temporary://p17auo77li1d5l1n0uoaa1os23l04.tmp could not be copied, because the destination directory public://null is not configured correctly.
Throwing a dvm($params['file_directory'] === 'null'); at the top of the media_browser() function makes it clear that the file_directory query parameter is coming through as the string 'null'.
Comments
Comment #1
devin carlson commentedSince
media_variable_getis being used, a default value forwysiwyg_upload_directoryshould probably be set inmedia_variable_default.Something like the attached patch?
Comment #2
jhedstromPatch in #1 works for me, aside from a simple typo (
=instead of=>). Fix attached.Comment #3
ParisLiakos commentedComment #4
ParisLiakos commentedThanks, commited
http://drupalcode.org/project/media.git/commit/78d6d49