简体   繁体   中英

opencart 2.2 Resource interpreted as Document but transferred with MIME

When I try to put an image in the product description the following error occurs:

"Resource interpreted as Document but transferred with MIME".

This happens only when I search the images inside a folder. Images that are in the root works normally.

When I choose an image inside some folder, the image opens in another tab and it is not added in the content of the description

在此处输入图片说明

I found the problem! To fix the /admin/view/javascript/common.js file.

Look for a line // $ ('# modal-image a.thumbnail'). In ('click', function (e) { $ ('# modal-image a.thumbnail'). In ('click', function (e) {

inside function

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

Replacement of

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

by

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM