A JS TypeError is thrown when uploading files via the media browser.
Steps to reproduce:
* In a field that has a WYSIWYG launch the media browser
* Upload a new file
* Click submit
* At this point you should see the following error in the console:
TypeError: this.contentWindow.Drupal.media.browser is undefined
http://yourhost/sites/all/modules/media/js/media.popups.js?v=7.x-2.x
Line 105* Clicking save still inserts the file correctly.
It seems like this can be fixed by changing line 103:
if (this.contentWindow.Drupal.media.browser == undefined) return;
See attached patch
| Comment | File | Size | Author |
|---|---|---|---|
| media_type_error_fix.diff | 598 bytes | arthurf |
Comments
Comment #1
elijah lynnThis does make the error not appear anymore, I cannot speak for the technicality of this though.
Comment #2
ParisLiakos commentedthanks, committed
http://drupalcode.org/project/media.git/commit/4a18a67