Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
I've created a view listing recent media thumbnails and put it into a block, so it is shown in the sidebar. The problem is the WYSIWYG editor cannot be loaded, because of a javascript error:
Drupal.settings.media.browser is undefined @ http://example.com/drupal/sites/all/modules/media/js/plugins/media.library.js?m7ww1r:7
I don't understand what's going on here. But if added a line before line 7:
if (typeof Drupal.settings.media.browser == 'undefined') return;
The error is gone and editor is loaded.
Comments
Comment #1
dddave CreditAttribution: dddave commentedStill an issue in latest dev?
Comment #2
xiaoruoruo CreditAttribution: xiaoruoruo commentedOK. I spent some time to test in latest dev (2012-Oct-31). It gives the following js error:
Comment #3
arthurf CreditAttribution: arthurf commented@xiaoruoruo can you clarify where this is happening? The block that you've created, do you mean a display of files and is this displaying on a node edit page?
Comment #4
arthurf CreditAttribution: arthurf commentedThere is a patch for something similar on #1704542: media.library.js causes javascript error
Comment #5
dddave CreditAttribution: dddave commentedYou might want to check this link. Also please be sure everybody to work against dev.
Comment #6
arthurf CreditAttribution: arthurf commentedWoops, that issue should have been #1883210: JS TypeError on file upload
Given that this file no longer exists in 7.x-2.x I think we can close this issue- though the error persists in media.popup.js which is addressed in the above issue.