Open NkDimi opened 8 years ago
I got the same problem
i change editor.html in this
$(function() {
if (!Mosaico.isCompatible()) {
alert('Update your browser!');
return;
}
var basePath = window.location.href.substr(0, window.location.href.lastIndexOf('/'));
var plugins;
plugins = [function(vm) {window.viewModel = vm; }];
var ok = Mosaico.init({
imgProcessorBackend: basePath+'/img',
emailProcessorBackend: basePath+'/dl',
titleToken: "Responsive Email Designer",
fileuploadConfig: {
url: basePath+'/upload',
// messages??
}
}, plugins);
if (!ok) {
console.log("Missing initialization hash, redirecting to main entrypoint");
document.location = ".";
}
});
Now i do not have this error but he always give me first image from /upload folder this is a reason because srcMatch: null
so he do not have right path to /uploads folder to make match. When I find solution I will post it.
While this project is seemingly dead I did find a solution to your loading of the first picture. While in config.php the paths SAY that they are relative to BASE_URL they are not. So if your url is /mosaico/editor.html... then the paths need /mosaico/ in front.
I am using
template-versafix-1
Operation system:Amazon Linux AMI 2016.03.3 (HVM), SSD Volume Type
Version:ImageMagick 6.7.8-9 2016-06-22 Q16 http://www.imagemagick.org
npm -v 3.9.6
node -v v5.9.1
background gruntI am using your editor.html and this is a problem:
Unexpected upload error (SyntaxError: Unexpected token < in JSON at position 0)
Placeholder images are showing and also img are in uploads folder.
This is a nginx configuration:
This is how folder looks on server:
I also try when folders are in php-backend and also in mosaico folder.
I read all your suggestion from Issues but I can not find solution for this error. Also try to change path with adding or removing slash but still not working.