Jump to content

'undefined' error during product picture uploading


szkrin

Recommended Posts

Hello. I have one problem with my prestashop 1.5.4.1

When i try to upload picture to my product i receive 'undefined' error.

In console i've got 'Failed to load resource: the server responded with a status of 500 (Internal Server Error)'

When i tried to upload it again it worked. 

With other pictures it didn't go such well - i wasn't able to upload them no matter how many times i tried. 

I changed 'fileuploader.js' but it didn't help. 

 

Is anyone able to help me with this problem?

 

Regards.

Link to comment
Share on other sites

Thanks for your reply. Your suggestion was right - uploading smaller images (640 x 480 f.ex). works after 2 tries. But when i try to upload sth big it doesn't work. I guess that I can change this limit in some config file. Mostly I would like to solve this double-uploading error. Do you have any suggestion?

Link to comment
Share on other sites

  • 1 month later...

I returned to prestashop after 'some' time. I Tried to fix this problem manualy, I asked some friends but noone was able to help me. Last time you asked for logs, so here theye are:

 

[28/Jan/2015:12:05:59 +0100] "GET /admin321/ajax-tab.php?id_product=4166&id_category=0&token=ab71b6dce85c4141537dbce24a8d265f&tab=AdminProducts&action=addImage&ajax=1&qqfile=10859758_752398274829100_1508575172_n.jpg HTTP/1.1" 500 - "http://example.com/admin321/index.php?controller=AdminProducts&id_product=4166&updateproduct&token=ab71b6dce85c4141537dbce24a8d265f" "Mozilla/5.0 (Windows NT 6.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/40.0.2214.93 Safari/537.36"
94.249.147.76 - - 

[28/Jan/2015:12:05:54 +0100] "GET /img/p/3/5/6/4/3564-small_default.jpg HTTP/1.1" 200 1534 "http://example.com/admin321/index.php?controller=AdminProducts&id_product=4166&updateproduct&token=ab71b6dce85c4141537dbce24a8d265f" "Mozilla/5.0 (Windows NT 6.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/40.0.2214.93 Safari/537.36"
94.249.147.76 - - 

 

- [28/Jan/2015:12:05:50 +0100] "GET /admin321/ajax-tab.php?id_product=4166&id_category=0&token=ab71b6dce85c4141537dbce24a8d265f&tab=AdminProducts&action=addImage&ajax=1&qqfile=10922792_770871722981755_3411772313965864367_n.jpg HTTP/1.1" 500 - "http://example.com/admin321/index.php?controller=AdminProducts&id_product=4166&updateproduct&token=ab71b6dce85c4141537dbce24a8d265f" "Mozilla/5.0 (Windows NT 6.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/40.0.2214.93 Safari/537.36"
94.249.147.76 - - 
 
 
I also incrased memory limit in my cpanel to 512 MB. I have no idea why this problem still occurs. Could you tryto help me again please? :) 
Link to comment
Share on other sites

[28-Jan-2015 12:12:50 ] PHP Notice: Undefined index: homeSize in /cache/smarty/compile/cd/f1/94/cdf19401eeab84972ec7df180f2f18e74fb63eee.file.blocknewproducts.tpl.php on line 57
[28-Jan-2015 12:12:50 ] PHP Notice: Trying to get property of non-object in /cache/smarty/compile/cd/f1/94/cdf19401eeab84972ec7df180f2f18e74fb63eee.file.blocknewproducts.tpl.php on line 57
[28-Jan-2015 12:12:50 ] PHP Notice: Undefined index: homeSize in /cache/smarty/compile/cd/f1/94/cdf19401eeab84972ec7df180f2f18e74fb63eee.file.blocknewproducts.tpl.php on line 58
[28-Jan-2015 12:12:50 ] PHP Notice: Trying to get property of non-object in /cache/smarty/compile/cd/f1/94/cdf19401eeab84972ec7df180f2f18e74fb63eee.file.blocknewproducts.tpl.php on line 58
[28-Jan-2015 12:12:50 ] PHP Notice: Undefined index: produkt in /cache/smarty/compile/d1/52/f2/d152f2eda4a984f7f844bc451283765f4a94a46d.file.product.tpl.php on line 420
[28-Jan-2015 12:12:50 ] PHP Notice: Trying to get property of non-object in /home/wodnafaj/bongs.pl/cache/smarty/compile/d1/52/f2/d152f2eda4a984f7f844bc451283765f4a94a46d.file.product.tpl.php on line 420
[28-Jan-2015 12:12:50 ] PHP Notice: Undefined index: produkt in /home/wodnafaj/bongs.pl/cache/smarty/compile/d1/52/f2/d152f2eda4a984f7f844bc451283765f4a94a46d.file.product.tpl.php on line 421
[28-Jan-2015 12:12:50 ] PHP Notice: Trying to get property of non-object in /cache/smarty/compile/d1/52/f2/d152f2eda4a984f7f844bc451283765f4a94a46d.file.product.tpl.php on line 421

 

 

Maybe this one then?

Link to comment
Share on other sites

[03-Feb-2015 10:33:29 Europe/Warsaw] PHP Fatal error: Uncaught exception 'Exception' with message 'Getting content length is not supported.' in /home/wodnafaj/bongs.pl/classes/FileUploader.php:245
Stack trace:
#0 /home/wodnafaj/bongs.pl/classes/FileUploader.php(69): QqUploadedFileXhr->getSize()
#1 /home/wodnafaj/bongs.pl/controllers/admin/AdminProductsController.php(1302): FileUploaderCore->handleUpload()
#2 /home/wodnafaj/bongs.pl/classes/controller/AdminController.php(522): AdminProductsControllerCore->ajaxProcessAddImage()
#3 /home/wodnafaj/bongs.pl/controllers/admin/AdminProductsController.php(1251): AdminControllerCore->postProcess()
#4 /home/wodnafaj/bongs.pl/classes/controller/Controller.php(158): AdminProductsControllerCore->postProcess()
#5 /home/wodnafaj/bongs.pl/classes/Dispatcher.php(349): ControllerCore->run()
#6 /home/wodnafaj/bongs.pl/admin321/ajax-tab.php(41): DispatcherCore->dispatch()
#7 {main}
thrown in /home/wodnafaj/bongs.pl/classes/FileUploader.php on line 245

 

public function getSize()
{
if (isset($_SERVER['CONTENT_LENGTH']))
return (int)$_SERVER['CONTENT_LENGTH'];
else
throw new Exception('Getting content length is not supported.');
}

I checked variable $_SERVER['CONTENT_LENGTH'] and it's set to 0. 
Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...