Closed (fixed)
Project:
D7 Media
Version:
7.x-2.x-dev
Component:
Code
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
9 May 2013 at 09:10 UTC
Updated:
23 Oct 2018 at 18:59 UTC
Jump to comment: Most recent
Comments
Comment #1
PascalAnimateur commentedHaving the same problem on one of my sites...
Comment #2
luksakWell, the initial report was a while ago. I encountered this issue after updating core to 7.50. This release introduced the X-Frame-Options header: https://www.drupal.org/node/2735873
You can solve this temporarily by adding this to your settings.php:
But adding this header was a security hardening and shouldn't be removed. I guess the issue is that the media browser iframe is loaded relatively:
<iframe src="/media/browser?render=media-popup"></iframe>Using a absolute URL would solve this I guess.
Comment #3
ngocketit commentedHave the same issue which is weird. The URL is set in
media_browser_js();function and it's indeed relative. Is there any way to make it absolute?Comment #4
steinmb commentedLot changes have been committed to the module. Does anyone seeing this have to time to re-test?
Comment #5
luksakI just tested this on another site and I still have this issue with RC12 on 7.52. Setting x_frame_options fixed the issue again.
Comment #6
luksakOk, the issue I have is caused by the x_frame_options I had before:
Removing this and using the default value "SAMEORIGIN" sovles this issue.
Also worth noting is that this issue is present on Firefox but not on Chrome. Chrome probably already ignores X-Frame-Options.
Comment #7
luksakComment #8
steinmb commentedComment #9
Coop920 commentedI am still experiencing this issue, but as #6 said, only in Firefox.
Comment #10
joseph.olstadIn 7.x-3.x there is a patch that has code that could be repurposed for this
#1352182: Media assets should have relative paths for wysiwyg editors
allows optional setting
media_browser_relative_url
by default this variable is set to FALSE , this way items get full url for files but we'd have to purpose this for the media browser iframe
this method could be adopted to put the full path for the media browser iframe
the media browser code in question is:
line 426 media.module
line 491 media.module
where there is a will, there is a way.
Comment #11
Shai commented#1990864-6: Getting "Load denied by X-Frame-Options" JS error #6 worked for me. Thanks.
And to be explicit, what Luks meant is:
Comment #12
steinmb commented