When adding media files in Chrome browser the overlay does not disappear. Requires full page reload which resets all form values.

Uncaught TypeError: Cannot read property 'Drupal' of undefined media.popups.js:103undefined

CommentFileSizeAuthor
#1 chrome.png81.13 KBcesar.perales
#1 chrome2.png90.1 KBcesar.perales
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

cesar.perales’s picture

FileSize
90.1 KB
81.13 KB

This happened to me too, i tested 7.x-1.0-rc1, 7.x-1.0-rc2 and 7.x-2.0-dev, all behave the same using firefox 3.6 or chrome 16 on ubuntu 10.10.

This happen when i try to add a second url, or when i press add another element and then try adding the url, the overlay doesn't disappear and a div with white background and id "media-browser-page-wrapper" remains on top.

in chrome i get this (nothing in firefox):

Uncaught RangeError: Maximum call stack size exceeded
d.event.remove
d.event.remove
d.event.remove
....
....

*in the screenshots, i added several videos one at a time.

Dave Reid’s picture

Status: Active » Postponed (maintainer needs more info)

Hrm, I haven't been able to duplicate this. Can you double check with a fresh install of core, default themes, and Media 7.x-1.x-dev or 7.x-2.x-dev only? I wonder if it's a custom theme or JavaScript that is interfering.

cesar.perales’s picture

I tried a fresh install with media 7.x-2.x-dev and default theme, it worked just fine.
Before mi first post i tried it without my theme js, and wasn't working.

I found a work around, replacing (media.popup.js line 85 and 90):

$(this).dialog("destroy");
$(this).remove();

with this:

$(this).detach();
$(".ui-dialog").detach();
$(".ui-widget-overlay").detach();

its ugly, but it works, don't know why.

temaruk’s picture

I experienced this behaviour (exactly the same javascript error) under the following circumstances:

- Media 7.x-1.0-rc2
- Remote stream wrapper 7.x-1.x-dev
- Logged in user has only authenticated role

As soon as I enabled the 'Add media from remote URLs' permission for the authenticated role, the problem went away.

cesar.perales’s picture

just for the record, my user had the right permission: "Add media from remote services", and the problem persist, using 7.x-2.x-dev.

tsvenson’s picture

@temaruk: Does it still happens with RC3?

@cesar.perales Can you reproduce this yourself? If you can, please provide a step by step description on how to do it.

Also, ask your user if he have any plugins for Chrome that might cause this to happen.

endrus’s picture

I can confirm this overlay problem with both RC3 and 7.x-2.0-unstable3. In fact, the bug also occurs in Firefox 10. Tried it on both Omega and default Drupal theme.

cesar.perales’s picture

I found what the problem was for me, i was using jquery.validate 1.5.5 which cause Uncaught RangeError: Maximum call stack size exceeded, replacing it with 1.9.0 fixed it.

Jquery plugin:
http://bassistance.de/jquery-plugins/jquery-plugin-validation/

Finn Lewis’s picture

I had the same issue, but a slightly different error:
Uncaught TypeError: Cannot read property 'browser' of undefined
With media-7.x-2.0-unstable3, Drupal 7-12 in Google Chrome (Firefox was fine).

Upgrading to 7.x-2.x-dev 2012-Mar-14 solved this for me.

Thanks Media people!

seanr’s picture

#3 did not work for me in 7.x-2.x. :-(

cesar.perales’s picture

@seanr if you have jquery validation try #8, that fixed #3

jackread’s picture

I had this problem and it was actually a PHP memory_limit problem. One of the images in the browser was so big it was causing PHP to crash. I increased the memory limit to 120M in the .htaccess and the browser appeared again.

Dave Reid’s picture

Status: Postponed (maintainer needs more info) » Fixed

As per #8, #9, #11, and #12 I'm marking this as fixed.

velocitykendal’s picture

Version: 7.x-1.0-rc2 » 7.x-1.2
Status: Fixed » Needs work

I have this problem with the most recent release (7.x-1.2) and previous versions. The initital upload of an image is fine, the dialog and overlay disappear. But on upload of a second image the dialog and overlay remain.

I took a look at lines 85 & 86 of media.popup.js as mentioned before and discovered these only fire on the first upload (as would be expected), anyone know why this might be?

mpgeek’s picture

Assigned: Unassigned » mpgeek
Status: Needs work » Postponed (maintainer needs more info)

@velocitykendal, can you verify that this problem exists with a fresh install of core, and the latest media 1.x? If so, can we get a more clear list of steps to reproduce the error? I was unable to reproduce with 1.x-dev in Chrome.

derjochenmeyer’s picture

Maybe this helps: Overlay was stuck with a clean Drupal 7.15 installation. No Modules enabled. The reason in my case was not Drupal but a Chrome extension called "Better Pop Up Blocker". Check your Chrome extensions.

turist’s picture

Seems to be a similar problem: http://drupal.org/node/1759862 .

I was not able to reproduce with Drupal 7.15 (upgraded with drush from 7.12)

Zettt’s picture

I have the same problem. I tested this with a new, fresh, no-extensions Firefox on OS X. Following the other issue, I'm using Seven as admin theme.

Just checked this on a virtual Windows machine. Same problem there. It's definitely one of our modules.

alibama’s picture

I'm having the same issue - tested with windows IE, and firefox and on mac with chrome, firefox, and safari - no luck with any of them. am not using any internationalization modules or translation tools. I've uploaded to the latest dev with media and file entity, and have updated the database, cleared cache etc.... this seems like a duplicate of https://drupal.org/node/1364640 and https://drupal.org/node/1595194 and almost certainly a duplicate of https://drupal.org/node/1503340

any help greatly appreciated - i'm looking for other modules to replace media and am really not digging any of them half as much....

Thank you all

GemVinny’s picture

Issue summary: View changes

I have also got the same problem... has anyone come up with a solution for this?

Thanks
Gemma

steinmb’s picture

Status: Postponed (maintainer needs more info) » Closed (cannot reproduce)