How to solve Blocked a frame with origin from accessing a cross origin frame error in wordpress? [duplicate]

假装没事ソ 提交于 2019-12-08 18:46:22

问题


I am working on a WordPress website in which there are a lot of wordpress plugins installed.

The plugins installed on the wordpress website has the following options:

When I click on View details option, I am getting the blank screen as shown below in an image but when I open in a new window or tab, it works.

On checking console, I am getting the following error (when clicking on View Details fails to open on the same page):

Blocked a frame with origin from accessing a cross-origin frame.
  at Contents
  at Function.map
  at a.fn.init.n.fn.(anonymous function) [as contents]
  and many other places. 


Problem Statement:

I am wondering which file I need to modify in wordpress in order to solve this error. This error seems to exist in every wordpress plugins. It works in a new tab or window but fails to work in the same page.


回答1:


The browser is blocking the new frame due to an HTTP security header. There are few relevant security headers and you can get the details here: https://www.dionach.com/blog/an-overview-of-http-security-headers

Most likely, that one of the WordPress security plugins is injecting this header.

In rare cases, the web server itself was configured to inject those headers.

I suggest to search through the settings of all active security plugins to find where the "Same Origin Policy" is forced on admin screens.

If you can't find the setting directly, then disable the plugins one-by-one, till the issue is resolved. Of-course, there is a plugin to disable plugins for you only (without affecting any other user): https://wordpress.org/plugins/health-check/




回答2:


This issue can be from video iframe. Which can be in widget or anywhere you used. Did you added any video iframe from any channel which has any privacy or restriction.

If it's for particular plugin use case then please take a look around where you used or check plugin code or plugin issues if it has any issue then apply patch for that ?



来源:https://stackoverflow.com/questions/53255468/how-to-solve-blocked-a-frame-with-origin-from-accessing-a-cross-origin-frame-err

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!