uSked / mosaico-php-backend

A PHP backend for Mosaico
GNU General Public License v3.0
32 stars 34 forks source link

Image upload returns JSON error #22

Open dertrons opened 7 years ago

dertrons commented 7 years ago

Hello! Could I please get some troubleshooting assistance for an "unexpected upload error". The file uploads, appears very briefly, and then disappears, and the following error is thrown.

Error in Chrome (53.0.2785.143 m): SyntaxError: Unexpected token < in JSON at position 0 Error in Firefox (50.0b1): SyntaxError: JSON.Parse: unexpected character at line 1 column 1 of the JSON data.

Setup: Local WAMP stack on Win10 64, Imagick is installed and responding. Have followed instructions closely. Directories are being found although I do get the following notice from index.php:

Notice: Undefined index: HTTP_HOST in C:\wamp64\www\seven\modules\civicrm\ext\uk.co.vedaconsulting.mosaico\packages\mosaico\backend-php\config.php on line 8

Array
(
    [1] => http://./
    [2] => ./
    [3] => uploads/
    [4] => uploads/
    [5] => uploads/static/
    [6] => uploads/static/
    [7] => uploads/thumbnails/
    [8] => uploads/thumbnails/
    [9] => 90
    [10] => 90
)

I'm attaching the console log showing the Chrome error message generated by fileupload.js:304. localhost-1476436180410.txt

And is a (perhaps related) noob questions: 1) Mosaico cannot load print.css. Is this an issue at all? I am getting the error: Failed to load resource: the server responded with a status of 403 (Forbidden). Folder permissions are set to 777. In the console I see that it's trying to load from (... /civicrm\css/print.css). Is that forward slash right? If not, how do I remedy? Here is the text from the console: ////

Even a link to some documentation explaining how to properly troubleshoot this would be very much appreciated. Thank you for your help!

bago commented 7 years ago

The import issue is something about civicrm, we can't help here...

The missing HTTP_HOST issue seems to be a WAMP thing: http://stackoverflow.com/a/27530825

dertrons commented 7 years ago

Thanks for the quick reply. At least I know where not to look!

EvilBash0r commented 7 years ago

@dertrons have you figured this out? I'm running into the same thing on a LAMP server, no Apache or PHP errors reported or seen anywhere? Sorry about replying here, don't have any other means of contacting you and I've been fighting with this thing trying to make it work for a really long time now.