The attachment says it all. I've successfully uploaded the image, but the dialog stays open, escape doesn't do anything, and there's nothing in the error console. This is in Chrome.

Stuck dialog

CommentFileSizeAuthor
#2 video_fail.png180.73 KBseanr
popup_stuck.png154.18 KBseanr

Comments

dddave’s picture

Title: Stock in overlay after upload, no way to close modal dialog » Stuck in overlay after upload, no way to close modal dialog
Version: 7.x-2.0-unstable3 » 7.x-2.x-dev
Status: Active » Postponed (maintainer needs more info)

Please test with the latest dev to see if this problem persists. If so, could you please check for script errors or such with firebug or chromes dev tools?

seanr’s picture

StatusFileSize
new180.73 KB

Just got it again trying to post a video after the upgrade. There is nothing in Chrome's error console. See attached.

dddave’s picture

Status: Postponed (maintainer needs more info) » Active

I am going to try to recreate this tonight. Does this only happen with Chrome? Are you testing on a vanilla instal or do you have other modules in use which could interfere?

seanr’s picture

Looks like a Chrome/webkit issue to me right now, but it is fairly intermittent even then. Often reloading the page and trying again will make it work, and sometimes it's only when it's the second item in the page. It's just generally pretty erratic. We do have other modules installed, but none that should be interfering with the javascript on the node/edit screen other than WYSIWYG. We're using the default D7 admin theme on node edit pages. There aren't even many custom fields on this content type, just a couple of checkboxes, a text field and an image field in addition to the body. I will try to retest on a perfectly clean install and see if that has any impact.

dddave’s picture

So far I wasn't able to reproduce this with latest media2 dev. Might be some odd interference...

seanr’s picture

Still doing it for me with the dev version. What other modules are known or suspected to interfere with it?

dave reid’s picture

Status: Active » Postponed (maintainer needs more info)

I would be checking your browser's JavaScript console for JS errors. Not sure if that's been answered or not. The modal's iframe could actually be loading your site's default theme and not your admin theme so it could be some kind of conflict. JS console is the best way to find out.

stephen Piscura’s picture

I'm actually running into the same thing in Firefox, only i can see overlay and nothing else. So to be clear, when i click "Select media", an overlay comes up and nothing else. The overlay remains until i refresh the page.

This same behavior happens using both the 7.x-2.0-unstable3 and 7.x-2.x-dev versions.

I'm at a complete loss here. I've cleared caches, run updates, run cron, etc. At this point, i don't even have the beginning of an idea about how to troubleshoot this. The site is more or less crippled for my client until i can fix it.

Out of desperation, i'm posting the console log, but i don't possess the sorcery necessary to discern and act upon it.

So this is me putting out an SOS.

[12:15:22.181] Use of getAttributeNode() is deprecated. Use getAttribute() instead. @ http://legationagallery.com/node/24/edit?destination=node/24

[12:15:22.189] Use of attributes' specified attribute is deprecated. It always returns true. @ http://legationagallery.com/node/24/edit?destination=node/24

[12:15:22.228] GET http://legationagallery.com/media/browser?render=media-popup&types%5Bimage%5D=image&activePlugins=&enabledPlugins%5Bupload%5D=upload&enabledPlugins%5Bmedia_default--media_browser_1%5D=media_default--media_browser_1&schemes%5Bpublic%5D=public&schemes%5Bprivate%5D=private&file_directory=media%2Fimages&file_extensions=jpg+jpeg+gif+png+mov+m4v+mp4+mpeg+avi+ogg&max_filesize=&uri_scheme=public&plugins=undefined [HTTP/1.1 500 Internal Server Error 230ms]

[12:15:22.238] GET http://legationagallery.com/themes/seven/images/ui-icons-222222-256x240.png [HTTP/1.1 304 Not Modified 34ms]

[12:15:22.509] this.contentWindow.Drupal is undefined @ http://legationagallery.com/sites/legationagallery.com/files/js/js_PUAK7KsP4urOx30zLWP6mlz6WLJUCZ-zNjAha5smdUs.js:393
dave reid’s picture

GET http://legationagallery.com/media/browser?render=media-popup&types%5Bima... [HTTP/1.1 500 Internal Server Error

This sure sounds like the problem. I would check your admin/reports/dblog page or your server's error logs for PHP fatal errors as to why this happened.

dddave’s picture

seanr’s picture

In my case, it only fails in webkit, and there are no javascript errors in the console and no errors recorded by Drupal either. Reload the page and the popup works just fine. It's all very bizarre to me.

stephen Piscura’s picture

Thanks Dave,

I thought as much. I don't yet have a sense of how to correct this internal server error (and thus the problem persists). I've got to get someone more equipped than myself to look under the hood. In any case, your response is greatly appreciated.

kevcol’s picture

I get the same behavior in Firefox as Stephen when I allow anonymous users to upload embedded YouTube and Vimeo video.

"I'm actually running into the same thing in Firefox, only i can see overlay and nothing else. So to be clear, when i click "Select media", an overlay comes up and nothing else. The overlay remains until i refresh the page. only i can see overlay and nothing else. So to be clear, when i click "Select media", an overlay comes up and nothing else. The overlay remains until i refresh the page."

When I am logged in, this isn't a problem. But I was trying to allow anonymous users to add video links.

I dunno if that wrinkle helps.

Not sure if it's related, but I see watchdog errors that say "page not found - misc/jquery.cookie.js"

dddave’s picture

This info in #13 seems relevant. @seanr are you an anonymous user, too?

stephen Piscura’s picture

Updating to media 7.x-2.0-unstable4 solved my problem. Magically.

Thank you Drupal community, for always making things better.

prins310’s picture

Re: Status: postponed (maintainer needs more info)

Drupal Gardens also seems to have been affected by this bug. See forum-post:

Editor hangs on "success message overlay" after media upload

at

http://www.drupalgardens.com/content/editor-hangs-success-message-overla...

The issue, tracking internally as DG-1848 at Aquia.

Maybe the team at DG can provide more info, so this bug can be assigned and fixed.

prins310’s picture

Here is a typical error message I get in the console of Safari 5.1.7 when trying to add media to a page:

TypeError: 'undefined' is not an object (evaluating 'ok.call')

/sites/default/files/js/js_RRuXkvUxqnpNHimRbg70Gk64RVYoK1chLoc3oo6bgv4.js on line 395

391 Drupal.media.popups.mediaBrowser.mediaBrowserOnLoad = function (e) {
392  var options = e.data;
393  if (this.contentWindow.Drupal.media.browser.selectedMedia.length > 0) {
394    var ok = $(this).dialog('option', 'buttons')['OK'];
395    ok.call(this);
396    return;
397  }
398 };

Does that help to pinpoint what causes the issue?

P.S. I am running Media 7.x-1.1 and Media Browser Plus 7.x-1.0-beta3

prins310’s picture

#10 provided the answer for me, as I use a translated interface.

See: http://drupal.org/node/1364640

Patch #3 successfully fixed my stuck in overlay after upload problem with Media 7.x-1.1.

Thanks dddave for pointing me in the right direction!

dave reid’s picture

Status: Postponed (maintainer needs more info) » Closed (duplicate)

Looks like we have multiple reports that this was fixed by #1364640: Upload popup window doesn't work with translated interface which has been committed to the latest 7.x-2.x and 7.x-1.x.

alibama’s picture

updated to the latest media 7x-2x and it's still breaking on both chrome and safari mac

idiaz.roncero’s picture

Issue summary: View changes

Same happens to me in 1.x.

Erratic behavior, though - it happens some times, others it's ok.

Using commerce kickstart 2.3