katiam Posted September 21, 2014 Share Posted September 21, 2014 Hi, All of a sudden, I can no longer add images to products. When I try to, the browser seems to become "unresponsive", if I wait it returns an error "Unexpected token <". Sometimes it will have theoretically added an image, it will list a new question mark image placeholder. I have checked file permissions on img/p folder & subdirectories, they are 777 I have tried and have same prob in chrome, ffox and internet explorer I have checked and I have not exceeded disk or bandwidth quotas on my server The files I am uploading aren't excessively large- they average 4mb and are JPGs. Anyone else have this problem? Any ideas??? Help would be most appreciated!! thx. Link to comment Share on other sites More sharing options...
nutxlago Posted September 21, 2014 Share Posted September 21, 2014 (edited) Katiam, folders permission should always be 755 (644 for files) Have you added a new non-PS module recently? If this is the case, try to disable it. Then, always, turn your cache off in B.O. > Advanced Parameters > Performance IEdited to add: if the error is still there, copy the full info about it here. Then come back and tell us! Edited September 21, 2014 by nutxlago (see edit history) 1 Link to comment Share on other sites More sharing options...
katiam Posted September 21, 2014 Author Share Posted September 21, 2014 Thank you nutxlago, appreciate your help. I chose the "disable all non-prestashop module" option in the advanced parameters> performance settings and have also disabled the site cache. Still no luck. I tried in firefox again just because, same thing happens however it gives a better error message: "JSON.parse: unexpected character at line 1 column 1 of the JSON data" Ahh ok, I enabled console in developer tools, and the response from the ajax request is: "<br /> <b>Fatal error</b>: Allowed memory size of 67108864 bytes exhausted (tried to allocate 17280 bytes) in <b>/home/goodasnethreads/public_html/classes/ImageManager.php</b> on line <b>384</b><br />" How do I increase memory size, is this an apache thing or mysql thing? thanks again for the help, really appreciate it! Link to comment Share on other sites More sharing options...
katiam Posted September 22, 2014 Author Share Posted September 22, 2014 (edited) So, I've solved this- added a line to the config.inc.php file: ini_set('memory_limit', '256M'); Not sure what the memory limit was, but this did the trick. Might squish my images a bit more in future too. Edited September 22, 2014 by katiam (see edit history) 1 Link to comment Share on other sites More sharing options...
nutxlago Posted September 22, 2014 Share Posted September 22, 2014 Glad you have solved your issue with images, Katiam! Anyway, you would try to reduce your images weight. 4mb is far too much weight for an image, even for a very big and quality one. They would be ok for a fast internet connection, but your store will be hard to be seen on mobiles and public wi-fi connections. Good luck! Link to comment Share on other sites More sharing options...
ussvn Posted October 31, 2014 Share Posted October 31, 2014 So, I've solved this- added a line to the config.inc.php file: ini_set('memory_limit', '256M'); Not sure what the memory limit was, but this did the trick. Might squish my images a bit more in future too. I've tested it but nothing happen. I still got "Unexpected Token<" when I tried to upload image to product (It worked fine when I test all website on my localhost, after I upload all website to VPS, I got this error) Is there anyone facing this issue and help me how to solve it, I'm very appreciated that Link to comment Share on other sites More sharing options...
ussvn Posted October 31, 2014 Share Posted October 31, 2014 I have this error when upload image of product. "JSON.parse: unexpected character at line 1 column 1 of the JSON data" Link to comment Share on other sites More sharing options...
LBPC Posted November 5, 2014 Share Posted November 5, 2014 Me too - "Unexpected token <". I can upload to product pages, but not to category minatures... Any ideas anyone? PrestaShop™ 1.6.0.9 Link to comment Share on other sites More sharing options...
ussvn Posted November 8, 2014 Share Posted November 8, 2014 Finally, it's worked already. Just change CHMOD of cache, classes folder to 777 Link to comment Share on other sites More sharing options...
LBPC Posted November 9, 2014 Share Posted November 9, 2014 Finally, it's worked already. Just change CHMOD of cache, classes folder to 777 Thanks - could you explain that for a noob pls? Link to comment Share on other sites More sharing options...
navid68 Posted November 29, 2014 Share Posted November 29, 2014 The same problem happens to me and I found a simple solution that always works. I am not a programmer, I didn't change the code, I didn't modify the CSV file. My preferred browser is Chrome, so when the problems appears, I just start Firefox and login into my website. I don't understand the reason, I don't know the cause, I just change from Chrome to Firefox. It's that simple for me!! Both my Chrome and FIrefox are updated automatically.... I don't think the issue is related to the browser version. I don't think it is related to the CSV file.... I am not a programmer but I think it is an issue with PrestaShop code. Good luck Navid 1 Link to comment Share on other sites More sharing options...
Recommended Posts