Pronux Posted January 13, 2014 Share Posted January 13, 2014 If your hosting company is using cPanel, look here for a solution: http://www.prestashop.com/forums/topic/294388-error-undefined-uploading-product-image-in-version-1561/?p=1523128 Link to comment Share on other sites More sharing options...
jeffld2 Posted January 18, 2014 Share Posted January 18, 2014 Problem Solved. Follow onahkenneth's recommendation to change fileuploader.js file. Thanks Kenneth Link to comment Share on other sites More sharing options...
lrmymycn Posted January 21, 2014 Share Posted January 21, 2014 Hi Mauinsons, the instructions in this link fix it for me in the end https://sites.google.com/site/zainozzaini/prestashop/undefined-image-upload-function-for-prestashop-1-5-6-1 Try this fix using the fileloader.js for 1.5.6.1 This fixed my issue. Link to comment Share on other sites More sharing options...
benjamin utterback Posted January 21, 2014 Share Posted January 21, 2014 This fixed my issue. Hello all, this commit should work for everybody. It is implemented in 1.5.6.2. https://github.com/PrestaShop/PrestaShop/commit/2a1c991612c7b7d48f819b55f31218c93c5509fd Link to comment Share on other sites More sharing options...
borubar Posted January 29, 2014 Share Posted January 29, 2014 (edited) I have v 1541 - in IE it's ok, upload ok - in FF - not ok, hmmm How to solve this problem? This: https://sites.google.com/site/zainozzaini/prestashop/undefined-image-upload-function-for-prestashop-1-5-6-1 is not correct??? not work I noticed that after 15 minutes image added. But only one. Again the same. Edited January 29, 2014 by borubar (see edit history) Link to comment Share on other sites More sharing options...
indus Posted January 29, 2014 Share Posted January 29, 2014 The default behaviour when uploading images definitely needs to be changed in the upcoming 1.6 version. There is no way of knowing what is happening when an image is selected to be uploaded. Only way of knowing this is when the image is visible on the back office product page when successfully loaded. Images which are bigger in size take time to be uploaded and you need to wait till it appears. Not intuitive at all. The behaviour can be similar to the stock updation when there is an 'updating' message which appears at the top of the page. Link to comment Share on other sites More sharing options...
PT5000 Posted February 7, 2014 Share Posted February 7, 2014 Guys I have the same problem. Is it on prestashop itselfs or my back office (cpanelX) Could somebody guide me on how to changed the PHP etc setting please. Thanks Link to comment Share on other sites More sharing options...
benjamin utterback Posted February 7, 2014 Share Posted February 7, 2014 Guys I have the same problem. Is it on prestashop itselfs or my back office (cpanelX) Could somebody guide me on how to changed the PHP etc setting please. Thanks Hey PT5000, read the blog post in my signature with "php.ini" in it. It will give you more information to change it. Make sure to always back up and contact your hosting provider for any questions. Just for confirmation, what problem do you have exactly? What error message? Link to comment Share on other sites More sharing options...
PT5000 Posted February 8, 2014 Share Posted February 8, 2014 Hey PT5000, read the blog post in my signature with "php.ini" in it. It will give you more information to change it. Make sure to always back up and contact your hosting provider for any questions. Just for confirmation, what problem do you have exactly? What error message? Hi bud Thanks for the reply. All was fine until one morning, added a product fine when to add a product picture -- red box at the bottom saying undefined. Link to comment Share on other sites More sharing options...
lovejoys Posted February 11, 2014 Share Posted February 11, 2014 [uPDATE] Disabling Check the IP address on the cookie under Administration > Preferences did manage to solve the issue. I assume that the extra bits added by Cloudflare in the cookie triggers that security setting. Easy way would be to extend the class performing that security check by adding an array listing all of Cloudflare IPs. Thank you. this Disabling Check the IP address on the cookie under Administration > Preferences did the trick for me, so I just disable it when adding new pictures and then enabling it again. Thanks again. Link to comment Share on other sites More sharing options...
dileeparuwan3 Posted March 12, 2014 Share Posted March 12, 2014 (edited) Hi, If you want to avoid this error you have to replace following files from prestashop 1.5.5 files are /public_html/js/fileuploader.js /public_html/admin0428/ajax-tab.php please download the attached files and replace convert fileuploader.txt to fileuploader.js and crear your cache Best regards..! Dileepa ajax-tab.php fileuploader.txt Edited March 12, 2014 by dileeparuwan3 (see edit history) 1 Link to comment Share on other sites More sharing options...
borhwerk Posted April 1, 2014 Share Posted April 1, 2014 Hi, If you want to avoid this error you have to replace following files from prestashop 1.5.5 files are /public_html/js/fileuploader.js /public_html/admin0428/ajax-tab.php please download the attached files and replace convert fileuploader.txt to fileuploader.js and crear your cache Best regards..! Dileepa thanks man, this tutorial is super. I've used this to one of my shops. I was looking for this issue from a week now. In the beginning was ok. Could be a problem with the url encoding of the image??? Can you explaine us the reason??? Thanks again. You've saved me a lot of time and unsleeping nights. Link to comment Share on other sites More sharing options...
vampir_k Posted May 6, 2014 Share Posted May 6, 2014 even today after some years this problem is not resolved ... a problem from 2011 or 2012 ... it`s some kinda strange and akward. 1 Link to comment Share on other sites More sharing options...
atanatosweb Posted August 29, 2014 Share Posted August 29, 2014 hi all, i found something that worked. "disable mod_security in preferences > SEO & URLS in the back office. The actual setting is "Disable Apache Mod Security" and you need to set it to "yes" I also changed my image resolution. The file size was below 1mb but that wasn't the problem. My images were above 2000x3000 pixels so I changed the size to 900x1200 and that change coupled with the setting changed worked" i got it from http://www.prestashop.com/forums/topic/294487-solution-for-error-undefined-when-uploading-product-images/ it only worked if i use 900x1200. now i do not know what size to use if i want to upload a landscape picture or my logo/banner ? Thanks so much. This woks for my. Link to comment Share on other sites More sharing options...
CharlieA Posted September 7, 2014 Share Posted September 7, 2014 I am on PrestaShop version: 1.6.0.9 - Uploaded about 2 weeks ago to server space a Digital Ocean. A friend set up the OS and I think it's running nginx, php5, etc... I've built other sites, mostly with zen cart and liked the newer clean look of PrestaShop so I'm working on a PrestaShop site for a new client. Spent the past 5+ hours researching why images stopped uploading. Only have about 10 images as I'm still formatting (working with default-bootstrap theme). Tried some of the "tricks" in this thread but find some have already been included in this version. I know it's a bad idea but what worked was changing permissions on img and upload folders recursively. By this time I was working in IE8 on my Windows 8 computer having gone from Chrome to Firefox to Safari then to IE. Just loaded Ubuntu onto an old laptop and was heading there next. Decided to go back to recreate the issue. In IE all images loaded and displayed fine after changing to 777. Then I changed the imgs folder back to 775 hit refresh on my products page and lost the thumbnail images. Changed it back to 777 and they appeared again. Went back to Chrome, changed permissions back to 775, and it's now working. Also changed this "Check the cookie's IP address" from Yes to No and Back to Yes again and it's allowing uploads. I am not schooled or trained in coding but have been playing with it for many years. I am getting very frustrated by the errors when making backend changes. This needs to get fixed. Although not the right thread for this - the other error I keep getting is this 3 errors This link_rewrite field is required at least in English (English) Products must be in at least one category. This product must be in the default category. I opened a product that is working to edit it. Made absolutely no changes and hit Save and get this error!! I do absolutely nothing and hit Save again and I get "Successful update". What is that all about?? Then there's the backend speed, or lack thereof! I will take these other issues to the appropriate thread but wanted to express my frustration with what I perceive as the bugs in this latest build. 1 Link to comment Share on other sites More sharing options...
lemonpromotions Posted September 22, 2014 Share Posted September 22, 2014 I have just started getting the same error in PrestaShop™ 1.5.6.1 - why has this started happening ? Is is something that has been changed on the hosting, if so what ? http://www.golfpsin.co.uk Would appreciate some help with this one please. Link to comment Share on other sites More sharing options...
lemonpromotions Posted September 23, 2014 Share Posted September 23, 2014 Just so you know how my hosting admin resolved this - this is what they had to do for me on the server: "The site was triggering a chain of mod_security rules. mod_security has now been completely deactivated for the subfolder in question." The subfolder in question was the default prestashop admin folder - hope this helps someone else. Link to comment Share on other sites More sharing options...
klasiokas Posted November 1, 2014 Share Posted November 1, 2014 I have been working on this for the last 4 hours and this is what I found out. Because I started to dig big whole before I checked the image i have lost 3.55hours. The only reason I had " Undefined " error is due to Image dimensions - Pixels. Changed it to 700x1000 and it all works fine now. Link to comment Share on other sites More sharing options...
gkorolkov Posted November 23, 2014 Share Posted November 23, 2014 In my case the "undefined" error was related to Smush Optimize Image module and PS development mode being switched on. Apparently, the module (which automatically runs all uploaded images through Yahoo's SmushIt service) generated a few errors which were included in JSON response when development mode was enabled. This triggered the following error from fileuploader.js: SyntaxError: JSON.parse: unexpected character at line 1 column 1 of the JSON data Disabling the development mode or/and the Smush Optimize Image module solved the problem. Hope this helps. Link to comment Share on other sites More sharing options...
YanK1973 Posted April 5, 2015 Share Posted April 5, 2015 On 1.5.4.1 Strange behavior and errors when uploading images with various browsers, definitely a pain though... Chrome extension shows error TypeError: Cannot read property 'error' of null http://www.myshop.com/js/fileuploader.js:366 Replaced fileuploader.js with original from same version, no luck. PHP limit is fine, "Smush It optimize" disabled and i am on Lighttpd server Also, i cannot upload any .pdf file to product Attachments with error "invalid description". Maybe related, maybe not. Link to comment Share on other sites More sharing options...
TimTamTom Posted June 10, 2015 Share Posted June 10, 2015 Hey there, I'm glad I finally made to this 7th page! No single solution has helped so far... Frustrating. Prestashop oh prestashop.. Thanks for everyone's input so far though! Allright, ce problem: I'm using Prestashop 1.5.6.0 and get the undefined upload error since last 2 weeks. Also, I can't delete images since they simply change into a question mark.. The error: SyntaxError: Unexpected token < at Object.parse (native) at Function.e.extend.parseJSON (http://www.gathershop.nl/js/jquery/jquery-1.7.2.min.js:2:10821) at Function.jQuery.parseJSON (http://www.gathershop.nl/js/jquery/jquery-migrate-1.2.1.js:235:22) at qq.extend._onComplete (http://www.gathershop.nl/js/fileuploader.js:1096:35) at XMLHttpRequest.xhr.onreadystatechange (http://www.gathershop.nl/js/fileuploader.js:1065:22) I hope someone can help, much appreciated!! Thanks, Tim Link to comment Share on other sites More sharing options...
netvision2015 Posted September 1, 2015 Share Posted September 1, 2015 I just migrate a 1.5.4.1 shop to a new server (we have migrated some prestashops from the same version to this server and theay all work just fine) , suddenly i cannot upload product images, it just shows an Undefined Error at the botom, and then when i refresh that product page in admin panel, shows me an image with the question mark. Looking at the prestashop logs files it says this: 2015/09/01 - 17:01:28: Duplicate entry '29575-1' for key 'PRIMARY'<br /><br /><pre>INSERT INTO `ps_image_lang` (`id_image`, `id_lang`) VALUES ('29575', '1')</pre> at line 607 in file classes/db/Db.php *ERROR* I went to that Db.php file and it is just the error returning function. It is true that this id_image from ps_image_lang (29575) does exists, but where is the function that insert the record on that table?? i made a recursive search in the site files and i cant find anything, do someone has a clue of whats is going on with this? Thank you in advance Link to comment Share on other sites More sharing options...
empressia Posted October 14, 2016 Share Posted October 14, 2016 Check Your apache error log. I have problem with image upload and I had to change memory limit in php configuration to 256M. Fri Oct 14 14:26:54.139784 2016] [fcgid:warn] mod_fcgid: stderr: PHP Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 13392 bytes) in /xxxxx/public_html/classes/ImageManager.php on line 479, referer: Link to comment Share on other sites More sharing options...
johnxl Posted October 7, 2017 Share Posted October 7, 2017 Hello ! I am still using 1.5.4.0 Version . Today I get an Error. "Undefined" while uploading product image . I tried several solutions but nothing helped . Finally I tried to I disabled Apache Mod Security by checking "yes'' in back office - preferences - seo and urls - And after that I can't access my website or back office at all . I get white page 500 Internal Server Error . Please help . Maybe I can access some files trough cPanel and fix it back ? website. www.eksimanta.lv Thanks . Link to comment Share on other sites More sharing options...
johnxl Posted October 8, 2017 Share Posted October 8, 2017 Any ideas ? Link to comment Share on other sites More sharing options...
johnxl Posted October 8, 2017 Share Posted October 8, 2017 I have downloaded fresh .htaccess file and replaced my old one . And now website is up again . But I still can't upload product photos . Maybe I need to change memory limit from 128 to 256 ? I can do it by my self or only my hosting company can do that ? Link to comment Share on other sites More sharing options...
johnxl Posted October 8, 2017 Share Posted October 8, 2017 Tried everything but still can't upload product image . Link to comment Share on other sites More sharing options...
Recommended Posts