Snade Posted March 20, 2014 Share Posted March 20, 2014 (edited) Hello,I got this error when trying to upload category image: "Unexpected token <" What can be the reason for this JS error ? ------currently Im working on test website, that has been updated from 1.5 to 1.6. Maybe the upgrade or moving is somehow related.This is the only place it gives me error when uploading image, tried on other locations and they work goodThank you very much ========= UPDATE ===========I found this http://stackoverflow.com/questions/18561556/syntax-error-unexpected-token "This usually happens when you're including or posting to a file which doesn't exist. The server will return a regular html-formatted "404 Not Found" enclosed with '<html></html>' tags. That first chevron < isn't valid js nor valid json, therefore it triggers an unexpected token. What if you try to change 'funcoes/enquete_adm.php' to an absolute url, just to be sure? " ===== solution =====Uninstall, deleting files, getting original files from presta archive and installing again categories block module Edited March 20, 2014 by Snade (see edit history) 1 Link to comment Share on other sites More sharing options...
rhysk Posted March 28, 2014 Share Posted March 28, 2014 Great post, Snade. I had the same problem.. just resetting the module worked for me 1 Link to comment Share on other sites More sharing options...
sandgirl Posted April 28, 2014 Share Posted April 28, 2014 thank you for your help. I had the same problem... Link to comment Share on other sites More sharing options...
vekia Posted April 28, 2014 Share Posted April 28, 2014 hello and you reuploaded original files and problem disappeared? Link to comment Share on other sites More sharing options...
misu3108 Posted July 5, 2014 Share Posted July 5, 2014 Great this worked for me. Uninstalled the categories module and reinstalled and now it works. Thanks! 1 Link to comment Share on other sites More sharing options...
babak1410 Posted July 20, 2014 Share Posted July 20, 2014 merci Link to comment Share on other sites More sharing options...
Photonica Posted August 19, 2014 Share Posted August 19, 2014 I have the same problem but with product images, whats can I do? Link to comment Share on other sites More sharing options...
mvandijk Posted September 2, 2014 Share Posted September 2, 2014 (edited) If I uninstall and reinstall, will I lose anything (like assigned categories?) or is it safe to do so? EDIT: I used 'Reset', everything works now Edited September 3, 2014 by mvandijk (see edit history) Link to comment Share on other sites More sharing options...
sendesa Posted September 2, 2014 Share Posted September 2, 2014 I have the same problem but with product images, whats can I do? Me too, whenever i try to upload a product picture i have this : Unexpected token < How could i solve this ? Thank you Link to comment Share on other sites More sharing options...
mvandijk Posted September 3, 2014 Share Posted September 3, 2014 Me too, whenever i try to upload a product picture i have this : Unexpected token < How could i solve this ? Thank you Hi, i made a complete FTP backup and phpMyAdmin backup of my site, then i went to modules -> Block Category -> Reset. This worked for me! Link to comment Share on other sites More sharing options...
sendesa Posted September 3, 2014 Share Posted September 3, 2014 Hi, i made a complete FTP backup and phpMyAdmin backup of my site, then i went to modules -> Block Category -> Reset. This worked for me! I did it too but nothing changed. Probably because my problem doesn't affect category pics but product pics ... Link to comment Share on other sites More sharing options...
masterzman Posted September 17, 2014 Share Posted September 17, 2014 I want to also confirm that clicking RESET next to the category module will FIX this error. I also backed up my site and created a database backup before resetting, but it was unnecessary. However I still recommend doing so. Depending on your site theme or layout, you will need to 'Position' your block again, as it will default to its native position after reset. Mine appeared on the left hand side of my site where I normally do not place blocks. Simply running Live Edit fixed this. Link to comment Share on other sites More sharing options...
Ron morales Posted October 2, 2014 Share Posted October 2, 2014 Great this worked for me. Uninstalled the categories module and reinstalled and now it works. Thanks! Ok perfect work Link to comment Share on other sites More sharing options...
foxygardner Posted November 2, 2014 Share Posted November 2, 2014 I had the same problem. I reset the categories module and now I can upload the picture BUT even though it shows in backoffice, it says "image unavailable" in front office. Any other suggestions? Link to comment Share on other sites More sharing options...
Recommended Posts