Posted by xiaoruoruo on July 29, 2012 at 8:51am
5 followers
Jump to:
| Project: | Media |
| Version: | 7.x-2.x-dev |
| Component: | Media Browser |
| Category: | bug report |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | closed (fixed) |
Issue Summary
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
#1
Still an issue in latest dev?
#2
OK. I spent some time to test in latest dev (2012-Oct-31). It gives the following js error:
Uncaught TypeError: Object #<Object> has no method 'tabs' media.views.js:35Drupal.behaviors.mediaViews.attach media.views.js:35
(anonymous function) drupal.js:55
b.extend.each jquery.js:33
Drupal.attachBehaviors drupal.js:53
(anonymous function) drupal.js:391
b.extend.ready jquery.js:30
u jquery.js:38
#3
@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?
#4
There is a patch for something similar on #1704542: media.library.js causes javascript error
#5
You might want to check this link. Also please be sure everybody to work against dev.
#6
Woops, 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.