我跟随this tutorial在新安装的Drupal上安装了Wiris插件。
安装完成后,我单击Wiris图标开始添加公式,弹出窗口无法加载,并且在控制台区域出现以下错误:
Uncaught DOMException: Failed to execute 'postMessage' on 'Window': Invalid target origin '/DrupalQuiz/sites/all/libraries/ckeditor/plugins/ckeditor_wiris/' in a call to 'postMessage'.
at http://*.*.*.*/DrupalQuiz/sites/all/libraries/ckeditor/plugins/ckeditor_wiris/core/core.js:19:22导致问题的代码如下:
e.source.postMessage(postVariable, _wrs_conf_path);我不知道该如何处理这个问题。
发布于 2017-05-19 20:56:14
我没有一个完整的修复,但我能够让它在本地工作,用我的开发箱的基本路径替换_wrs_conf_path。_wrs_conf_path评估为插件文件夹的相对路径。
if (typeof(e.source) != 'undefined') { e.source.postMessage(postVariable, _wrs_conf_path); }
使用
if (typeof(e.source) != 'undefined') { e.source.postMessage(postVariable, _wrs_currentPath); }
在/sites/all/libraries/ckeditor/plugins/ckeditor_wiris/core/core.js文件中。
编辑:我用他们的一个内部变量_wrs_currentPath替换了_wrs_conf_path,这似乎解决了这个问题。
https://stackoverflow.com/questions/43297800
复制相似问题