opencart 2.2资源被解释为Document但是使用MIME传输

时间:2016-12-23 11:39:21

标签: javascript php mime-types opencart2.x

当我尝试在产品说明中放置图像时,会发生以下错误:

  

“资源被解释为文档但使用MIME传输”。

仅当我搜索文件夹内的图像时才会发生这种情况。根目录中的图像正常工作。

当我在某个文件夹中选择图像时,图像会在另一个标签页中打开,并且不会添加到说明的内容中

enter image description here

1 个答案:

答案 0 :(得分:0)

我发现了问题!修复/admin/view/javascript/common.js文件。

寻找一行// $ ('# modal-image a.thumbnail'). In ('click', function (e) {

内部功能

// Replace the summernotes image manager
('Summernote'). Each (function () {

替换

$ ('# Modal-image a.thumbnail'). On ('click', function (e) {
E.preventDefault ();
$ (Element) .summernote ('insertImage', $ (this) .attr ('href'));
$ ('# Modal-image'). Modal ('hide');
});

通过

$ ('# Modal-image'). Delegate ('a.thumbnail', 'click', function (e) {
E.preventDefault ();
$ (Element) .summernote ('insertImage', $ (this) .attr ('href'));
$ ('# Modal-image'). Modal ('hide');
});
相关问题