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.
Mediabrowser is not closing after clicking cancel button.
This is from the console log:
this.contentWindow.Drupal.media is undefined (media.popups.js Line 103)
Simple change seems to solve the problem.
Comment | File | Size | Author |
---|---|---|---|
#13 | Screenshot_2_10_13_3_49_PM.jpg | 708.24 KB | gmclelland |
#8 | Selection_055.png | 78.36 KB | girishmuraly |
#7 | close_popup-1409068-7.patch | 627 bytes | girishmuraly |
popup.patch | 593 bytes | olemsa | |
Comments
Comment #1
dddave CreditAttribution: dddave commentedI am not able to reproduce this error and it seems that you are the only person reporting such issues. Can you recheck with the latest dev and provide more infos if the problem persists?
Comment #2
Devin Carlson CreditAttribution: Devin Carlson commentedI haven't been able to duplicate this with the latest stable or development release of Media.
Comment #3
SocialNicheGuru CreditAttribution: SocialNicheGuru commenteddelete - it's not the same issue. similar but not quite
other similar issue:
http://drupal.org/node/1817096
Comment #4
SocialNicheGuru CreditAttribution: SocialNicheGuru commentedOk. I now that I solved one issue another pops up.
The modal popup does not close with a "this.contentWindow.Drupal is undefined"
i have a form opening in ctools_automodal and the media field is being called from the form in that modal.
so this might be an issue of a popup within a popup
Comment #5
mauritsl CreditAttribution: mauritsl commentedThis issue also mentions a problem with the popup:
http://drupal.org/node/1553114#comment-6624650
Comment #6
girishmuraly CreditAttribution: girishmuraly commentedThe fix mentioned in #0 works for me when applied manually to 2.0-unstable7.
Comment #7
girishmuraly CreditAttribution: girishmuraly commentedRerolling patch for latest 2.x-dev.
Comment #8
girishmuraly CreditAttribution: girishmuraly commentedSince #1 and #2 mentioned they could not reproduce this, I'm attaching a screenshot of what does not work. The above patch fixes this.
Comment #9
gmclelland CreditAttribution: gmclelland commentedI haven't experienced this yet. Can someone list the steps to reproduce on a clean install? Maybe something is conflicting with with the Rubik theme, the js, or other modules on your site?
Comment #10
girishmuraly CreditAttribution: girishmuraly commentedIt could be with the Rubik theme or another conflicting js, I'm not sure. I haven't tested this on the basic default theme.
However here are the steps to reproduce the problem in my case:
1. Add an image field to any content type with:
Field type: Image
Widget: Media file selector
2. In its field settings, tick 'Image' for 'Allowed remote media types' and set 'public://' as the Allowed URI scheme.
3. Go to the node/add page for this content type and add an image for this field.
4. Save the node.
5. Edit this node.
6. Try to edit the image you uploaded and add some data to it, such as Alt or Title or Description.
7. Hit Save.
Nothing happens for me when I hit Save. The window does not close and the data does not get saved. This is happening for me both on 2.x-dev and on 2.0-unstable7
Comment #11
arthurf CreditAttribution: arthurf commented@girishmuraly can you duplicate this with a file field?
Comment #12
aaron CreditAttribution: aaron commentedComment #13
gmclelland CreditAttribution: gmclelland commentedI just tested on a dev site with an image field and a file field and can confirm that this does happen for both cases.
Maybe we should bump this status to major?
See attached for a screenshot
Here is what the watchdog say's:
Warning: json_encode() [<a href='function.json-encode'>function.json-encode</a>]: recursion detected in json_encode() (line 4985 of /Users/glenn/websites/7c9d097f-0bc1-457d-8314-1d9e37f102bf/includes/common.inc).
I do not see any errors in the console.
I'm running locally on a Mac with Acquia Dev Desktop and using Seven as the admin theme.
Comment #14
gmclelland CreditAttribution: gmclelland commentedFYI.. I just created a clean test site at simplytest.me with media-2.x-dev and I couldn't replicate the problem. If anybody has any ideas of what is causing the problem, I'm all ears.
Comment #15
gmclelland CreditAttribution: gmclelland commentedCross referencing #1909408: ctools_modal_form_wrapper returns form array instead of ajax_commands array
It's the same error I'm getting #13.
Comment #16
gmclelland CreditAttribution: gmclelland commentedIf anyone is still having this issue with the latest dev version, please speak up. You can also try the patch at #1909408-17: ctools_modal_form_wrapper returns form array instead of ajax_commands array and see if that works.
I'm still not clear if this is the same issue as #1909408: ctools_modal_form_wrapper returns form array instead of ajax_commands array
Comment #17
ParisLiakos CreditAttribution: ParisLiakos commentedI commited the ctools patch, so if anyone steps on it in latest dev please, reopen
Comment #18
Honestly Illustrated CreditAttribution: Honestly Illustrated commentedReopening this on the 7.x-1.x branch.
This issue still exists in 7.x-1.x-dev, where we create a content type as in this video.
Click "Select media" and get this in JS console:
Paste your YouTube URL and click "Submit" and get this:
Result
We get no popup at all, after the media browser popup closes. JS calls out to Drupal, gets a reply:
The grey screen overlay div.ui-widget-overlay remains z-indexed on top of the page. No popup regarding the HTTP response.
Comment #19
Honestly Illustrated CreditAttribution: Honestly Illustrated commentedI was able to both stop and reproduce this bug. I found the root cause of my instance of the issue, but not a solution to the root cause of the bug itself.
My instance of it was in the fact that I had installed the 1.x version of Media, along with the 2.x versions of File Entity and Media: YouTube. (doh!)
However... we still have the bug occurring during error states of the module. Whatever the mismatched versions did to Media to cause an error, it seems that Media may have caught it or failed softly, but couldn't report anything through the popup code: the popup code has that separate unresolved bug.
Remember that the HTTP response code for the AJAX call was 200 OK.
Comment #20
ja09 CreditAttribution: ja09 commentededit below.
Comment #21
ja09 CreditAttribution: ja09 commentedPopup won't close when using Remote stream wrapper 7.x-1.0-beta4 and entering the "Remote URL". Remote URL's are working, but the popup window just redirects to /admin/content when clicking Submit. Otherwise, it seems to work normally, and the Cancel button does close the window.
Are there any known conflicting modules/js?
Comment #22
ja09 CreditAttribution: ja09 commented^ Nevermind, fixed my issue with this patch: https://drupal.org/node/1557580#comment-6627338
Comment #23
timodwhit CreditAttribution: timodwhit commentedI was getting this issue as well, what ended up being the issue was actually conflicting file_entity modules. https://www.drupal.org/node/2096859
Checkout your apache log to see if this error is occurring. It will appear as a javascript issue because the file is not being attached.
Comment #24
Chris Matthews CreditAttribution: Chris Matthews as a volunteer commentedClosing this issue as outdated. However, if you think this issue is still important, please let us know and we will gladly re-open it for review.
sincerely,
- the Drupal Media Team