John_John Posted July 10, 2013 Share Posted July 10, 2013 (edited) Hello, Was wondering if anyone ever had the following problem. I opened a random CMS page (for example: About us) and went ahead to insert an image through the editor. I can see the popup and i can upload, but as soon as the upload is finished it says the following: SyntaxError: Unexpected token : The strange thing is that when i refresh the folder, the image did upload correctly, but why am i getting this error? More importantly, how can i fix this? From the default installation i did install another theme (http://www.prestasho...sive-theme-15x/) But surely installing a theme would not affect uploading an image..... right? Thanks in advance Edited July 12, 2013 by John_John (see edit history) Link to comment Share on other sites More sharing options...
PascalVG Posted July 11, 2013 Share Posted July 11, 2013 Hi John, Does this happen in all kind of browsers, or just one specific one? Try a few others. What Prestashop version do you use? There are some possible causes mentioned here: http://productforums.google.com/forum/#!topic/chrome/Uj6DitMGK1A My 2 cents, pascal Link to comment Share on other sites More sharing options...
John_John Posted July 12, 2013 Author Share Posted July 12, 2013 (edited) Thanks for your reply Pascal. I tried Firefox and Chrome now and did get some more info in Firefox. It says " SyntaxError: missing } after property list " Based on this, i searched on Google and found something similar http://forge.prestas...owse/PSCFV-7564 Its solved by the way, but only with a slight modification based on the URL above It states to change search in the ajax_file_upload.php in admin/ajaxfilemanager directory ~~ line 54 $ manager = new Manager ($ upload-> GetFilePath (), false); Change in: $ manager = new Manager (dirname ($ upload-> GetFilePath ()), false); But the correct line should be (with removal of certain spaces) $manager = new Manager (dirname ($upload->getFilePath()), false); Edited July 12, 2013 by John_John (see edit history) 1 Link to comment Share on other sites More sharing options...
radonneus Posted September 15, 2014 Share Posted September 15, 2014 This also happened to me but in my case the solution was simple: log in again. To reproduce this "problem" you have to log into back office, go to product page -> images. After this, change your internet connection to a different one, wireless in my case, and try uploading a picture. You'll get the syntax error message because your admin session is no longer valid (different IP, etc.) and ajax_file_upload.php is redirecting you to login page wich is not a valid answer for the javascript script. Nothing wrong with ajax uploader in my case. Respect. Link to comment Share on other sites More sharing options...
MrTor Posted December 7, 2014 Share Posted December 7, 2014 (edited) Got same error on images upload process at PS 1.6.0.9 when moved deployed site to new server (Ubuntu 14.04 x64 at amazon AWS EC2 Cloud). That issue fixed easily with info provided by Apache err log - missed php-gd library found there! $ sudo apt-get install php5-gd and we are again friends) If it is possible to add test on all needed library presence at BO AdminInformation Controller, that will get a great convenience to all Prestashop movers! Sincerely Yours, Vic Edited December 7, 2014 by MrTor (see edit history) Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now