Jump to content
Wollie

'Undefined' error when uploading a new product image Prestashop 1.5.3.1

Recommended Posts

I have tried searching all the forums and couldn't find a solution so my apologies if this has already been resolved and I just haven't found it.

 

I am starting a new store and have done a fresh install of prestashop 1.5.3.1 on a remote server. I navigated to the BO and created a new product. I then tried to upload a product image but it throwed an 'undefined' error. The image is well within the size and resolution boundaries.

 

I did the same instalation of prestashop 1.5.3.1 on a local server. I navigated to the BO, created a new product and tried to upload the same image. This time it worked fine.

 

So far all of this has been done using Firefox.

 

I then navigated to the BO of my remote server using Internet Explorer. I tried uploading the same product image and it worked fine. So now I am really confused.

 

The problem can't be with the image - it works fine on both local and remote servers

The problem can't be with the remote server - it worked fine when using internet explorer

The problem can't be with the browser - it worked fine on my local server using Firefox

 

So what is happening here? I really want to be able to use Firefox for this. Any help you can give me would be really appreciated.

 

EDIT: Tested all the other browsers and it only seems to work in IE for the remote server

Edited by Wollie (see edit history)
  • Like 1

Share this post


Link to post
Share on other sites

Any updates on this problem? I have the same issue: PrestaShop™ 1.5.3.1

Resizing image in MB's or dimensions has no effect, neither changing permissions..

 

Please help!!

Share this post


Link to post
Share on other sites

Any updates on this problem? I have the same issue: PrestaShop™ 1.5.3.1

Resizing image in MB's or dimensions has no effect, neither changing permissions..

 

Please help!!

 

A lot of the 'solutions' I found suggested doing this too. I tried it out and it didn't work either.

 

hoped that this: http://forge.prestas...anel#issue-tabs would fix the problem,

 

but this patch is already in my version..

 

All the other 'solutions' I have found pointed to here:

 

https://github.com/P...69c7c8fa4b34dea

 

I tried changing these files on my remote server and again it made no difference.

 

 

Some additional information - I enabled firebug and tried to upload the image again and this was the result in the console:

 

http://puu.sh/1XtkZ

 

It may be of use to someone else?

  • Like 2

Share this post


Link to post
Share on other sites

On a windowsXP machine using Internet Explorer 8 it works fine.

 

Problem is I have a Mac and no IE...

  • Like 1

Share this post


Link to post
Share on other sites

Hello

It's a XHR denied access on server request (403). And not for all XHR request (front search works fine)

For me, everything is ok on my testing and staging universes, but didn't on my www universe

If you call the XHR url directly in you'r browser, there's no 403. Then, URL is fonctionnal, but no in AJAX mode

A problem with .htaccess ?

Thanks

  • Like 1

Share this post


Link to post
Share on other sites

I got a solution wich worked for me

 

add this to the bottom of the .htaccess

 

SecFilterEngine Off

SecFilterScanPOST Off

  • Like 2

Share this post


Link to post
Share on other sites

Hello luijt99,

Thanks. I've found this also this morning. I also deactivate the firewall application by OVH on my www and everything is ok now.

Thanks!

Share this post


Link to post
Share on other sites

The above solution does not work for me it actually kills the entire site until I remove those entries

This is the second site I have built (the first one had the same problem after about 10 products)

I thought mayby it was just the server anyways I did a fresh install on another server everything ran perfectly until product #61

WTF someone needs to look into this and fix it. Paying for modules on a site we can't use sucks

 

Also the solution here https://raw.github.com/PrestaShop/PrestaShop/3d1663279af813dafd19f128569c7c8fa4b34dea/classes/FileUploader.php doesn't work either

Edited by MadDawg (see edit history)
  • Like 1

Share this post


Link to post
Share on other sites

This image-upload-bug makes Prestashop 1.5.3.1 unusable. I think for me this is the final blow to Prestashop!

 

First there was this huge bug that made it impossible to do mass-image import via csv.

(that one I could solve three weeks ago with some hacks offered by the community members),

 

Glad this bug was solved, I found out recently that it is now impossible to upload productimages by hand via the backoffice. This time none of the solutions offered by the community worked! So what to do? I have to reconsider the use of Prestashop. Not so funny after all the time invested in it.

If it is not even possible to add productimage by hand via the backoffice, I cannot see how

'normal users' would be able to feed the Prestashop with products without my help.

 

The image system has been a very weak spot over the years, I found out Googling.

And it still is, maybe it's getting even worse. I cannot believe this.

First getting rid of those stupid white backgrounds of the productpictures was an adventure,

finding out about transparency in Prestashop (it renames png's to jpg! wtf is that good for?.

 

Then this ridiculous modern 'new' image filing system, where you loose all 'human' connection between productname/product id and imagename. The image naming system is very very poor.

Using the old 'legacy' image filing system is not that much pleasure either, as it is not supported well anymore and leaves you with one directory so crammed with images that it takes ages only to get a filelist on your screen.

 

Then this new module overridesystem, very beautiful indeed. But some of the main modules don't adapt nicely to the new rules. Result is a pure trial and error game to find out which file is actually being used by Prestashop (made worse by memory and caching problems of course).

The finding out that Homefeatured products module for instance doesn't work in a second language.

I found no way to get it going in another language. No documentation about this issue to be found.

 

The same with multishop/multilanguage. Even if you don't use it, it still gets in the way. Do you have to fill all those shop/language tables yes or no? It is not clear. It seems that the fresh installed Prestashop itself is not consistent in this respect.

 

Then finally you go to to your database via PHPMyAdmin and see the counterintuitive approaches, separating the productnames from the product id file, is that clever? Same with features, images, featuregroups. So no easy lookups.

 

But I worked around most of it, got the database filled with features and combinations, got the images up and running, invested a lot of time in a making a nice theme, and then this image upload bug finally surfaces again in a different manner. And is effectively killing all future useability of my Prestashop.

 

Grrrr. What a mess this Prestashop 1.5.3.1 is.

Edited by kashibabu (see edit history)
  • Like 4

Share this post


Link to post
Share on other sites

An error occurred while uploading image

 

 

while category image upload

 

and in module upload...

 

How can I fix it?

 

thanks

Share this post


Link to post
Share on other sites

kashibabu,you make some very good points. There are so many problems that are introduced with each new update, while many of the old problems are simply passed by.

 

I think before the developers venture forth with new features ALL of the current modules need to be culled and adapted to the suggesst new structure--function in modules; styles in themes; translations in text files or database tables (one or the other NOT both!!!) It is an absolute NIGHTMARE trying to nail down where to find stuff to adapt or fix.

 

AND WITH SO MANY F'ing versions that almost none of the posters write into their posts, I never know if what I am reading applies to my case or not!

  • Like 2

Share this post


Link to post
Share on other sites

luijt99 and webdigit thank you for your suggested solutions. I haven't tried them personally but for me, logically it doesn't make sense for the issue to be .htaccess related if I can complete the task on my remote server using IE but not Firefox.

 

MadDawg thanks for your input. I've never had the situation where I could upload for a period of time and then the service stops working as you have described. Which browser were you using?

 

kashibabu you make some brilliant points and I feel for you with how much effort you have put into this software to get very little in return. Hopefully the developers will take note and can bug-fix and release a patch. Perhaps taking one step back would help in taking two steps forward!

 

afranco I'm sorry you feel I haven't written into my post but I have been away. I have provided as much information as I can, I have detailed my case and as each case is different only you can decide which post best fits your situation.

 

As a general update to the thread I have made no further progress in determining what is causing this issue. As I put in y first post:

The problem can't be with the image - it works fine on both local and remote servers

The problem can't be with the remote server - it worked fine when using internet explorer

The problem can't be with the browser - it worked fine on my local server using Firefox

so where exactly can the problem be?

 

Sorry for not being much help personally but I am still relatively new with Prestashop development which is why I'm looking to more experienced users for assistance. I still haven't found any other solutions searching the forums and the internet in general.

Share this post


Link to post
Share on other sites

Wollie,

The behaviour is really strange and after a lot of reading on google, there's no single solution... For me the symptoms were an "undefined" when I uploaded image in the product backoffice AND aloso the impossibility to save informations in my footer. But everything other works fine...!

Changing my htaccess et unset the firewall give me the solution... but I'm not sure it's the real solution... cause as afranco said, I think it's more a compatibility issue...

Perhaps prestateam have to work on a better hack to permit old theme and module work.

I'm also interested in a real solution :)

Share this post


Link to post
Share on other sites

I send a error log to OVH wich generate the "undefined".

 

After 15.000 messages with OVH, a lot of incomprehension and annoyance (an a lot of incompetence from the OVH helpdesk) I've receive a answer :

 

"l'url a été bloqué par notre parefeu applicatif, malheureusement les règles de filtrage ne peuvent être communiquées."

 

Traduction : URL was blocked by the application firewall, and unfortunately we cant' communicate the filtrations rules"

 

That's all !

 

I begin to hate OVH. I'm a 6 years old client with more than hundred website hosted... And it's just their answer ! No more help !

 

I want to find a new good web hoster... Any ideas ?

 

Thanks.

Share this post


Link to post
Share on other sites

Hi all

 

Having followed prestashop over the years I have found all versions pretty stable, and prestashop is always my first choice, however since I started to use the latest version 1.5.3.1 I too have problems

with uploading images that are over 600k.

 

I have been trying to work out why for hours even dropping the database and rebuilding the database still the same problems? I have to say I did

manage to upload one image that was 1.4meg in size but now I can’t upload anymore over 600k

says undefined? The error says

 

Is there a fix for this problem yet? Or will there be an update soon as I’m working on an online shop with over 800 images and need to get the site uploaded.

 

Also see screenshot i was trying to upload a image size 1.4meg you can see the error at the bottom

 

Deep

post-488460-0-05177300-1361646232_thumb.png

Share this post


Link to post
Share on other sites

luijt99 and webdigit thank you for your suggested solutions. I haven't tried them personally but for me, logically it doesn't make sense for the issue to be .htaccess related if I can complete the task on my remote server using IE but not Firefox.

 

Hi Wollie,

I had the same problem. On a windows machine with IE I had no problems. But on Mac with Firefox I got this error with the image uploading.

The added setting to the .htacces fixed it. Don't ask how... because i really don't know. it just worked for me.

Share this post


Link to post
Share on other sites
Hi Wollie, I had the same problem. On a windows machine with IE I had no problems. But on Mac with Firefox I got this error with the image uploading. The added setting to the .htacces fixed it. Don't ask how... because i really don't know. it just worked for me.

 

already tried using IE, Firefox, opera but still the same result in here (with windows Xp and windows 7),

after click upload nothing happen in my screen, only result blank page with address bar showing new direction & token....

 

hmmmm is there any solution for this?

 

or should i waiting this bug patch fix in the next update (when....???),

 

tq

Share this post


Link to post
Share on other sites

I had this problem but this is what fixed it for me.

 

In config folder > defines.inc.php

 

I had PS_MODE_DEV set to true and show errors set to on

 

When I changed them back to false & off the error went away and the images uploaded correctly

Share this post


Link to post
Share on other sites

I am having the same problem with 1.5.3. I am using Google Chrome browser on a mac. I have a local setup using MAMP. I am not able to upload a 135kb png file. I set the product image preferences to png if baseline image is png - didn't work. I set it to always use png - that didn't help either. I checked my defines.inc.php file and PS_MODE_DEV_ was set to false. I changed the display_errors to off, but it didn't help, so I set it back to "on".

 

I do not understand much about firewall settings, so I am stumped here.

 

If I find a solution I will post it. If you are reading and you have any ideas for me, please reply. I could really use the help.

  • Like 1

Share this post


Link to post
Share on other sites

Okay I promised I would report back if I found a solution.

Here is what worked for me:

 

Even though my file size (135kb) was well below the 8mb limit, the image size was 2500x2500 pixels. I scaled it down to 500x500 (78kb) and tried again. It worked. Perhaps there is a limit to the pixel count as well as the file size and I was over the limit on pixel count before scaling? I am not sure why it worked. I just want to report my experience in case it helps someone else who may be struggling with the same issue. I find these forums very helpful.

  • Like 1

Share this post


Link to post
Share on other sites

I'm having this issue with a shop using PS 1.5.3 but with this shop, it works using IE9.

 

I upgraded a 1.4 to 1.5.4 PS but is not working in nothing, but I've upgraded my IE to IE10 so maybe this could be a little less problems.

Well... to the point.

 

I get this error while trying to upload, something abou the fileuploader.js line 1078

 

ans is saying 501 Method not implemented.

Share this post


Link to post
Share on other sites

Hello all,

 

I was reviewing this issue to see if I could duplicate it. I have the latest 1.54 loaded as well several older versions, but even with graphics up to 2 MB in size, I have no problems uploading the images for a new product. I tested this on a Windows 7 PC and Mac with Lion loaded in multiple browsers. I have been asking around and it does appear that the Prestashop client is attempting to communicate back to the server using Ajax (XHR errors are related to the communications between client and server - could be with the Javascript or something else there).

 

I would suggest involving a network admin and seeing if it's possible to look and see if errors are being generated server-side when using the Mac or other browser- however you are making the problem happen. If it's happening only for a certain pc types or browser it might be related to network security. This is definitely tough to nail down, but get the right people involved and you'd probably quickly find the source of the issue.

 

Was everyone getting these problems on UPGRADED versions of 1.5.3.1? Or fresh installations? Let me know if I got the steps right or wrong in trying to duplicate the problem:

 

1) Created new product.

2) clicked on IMAGES tab and uploaded a small image for the product. Also uploaded a large image.

 

If we can get more info on how people are making this problem happen, then we can hopefully define it for PrestaShop users running into this issue.

 

Wendsay- I would state if you're seeing a "501 Not Implemented error" then your host server may not support a command(s) in the javascript file that you were trying to run. Check out this URL for information on the 501 and some of things you can do to check it based on Linux or Windows:

 

Getnetgoing - help for HTTP error 501: "Not implemented"

 

 

Arnel C.

Community Support

Web Hosting Hub

Share this post


Link to post
Share on other sites

arncus thanks for your fast reply.

 

I tryed to see what is possible, with your documentation, but I couldn't, I'm not an expert and couldn't figure out how to do this, sorry.

 

One thing that I don't say, that may be helpfull, I can upload any image in BO, unless the product, in both versions.

 

The only thing I can do is upload with PS 1.5.3 with IE9 and IE10 in compability with older versions. (This is a fresh install, and can't upload in any other browsers)

 

In my upgraded version from 1.4 to 1.5.3, I can't upload from any browsers, even IE9 or IE10, and this is worst because this shop was working before, now it's closed.

 

I found a code somewhere saying that may be with ImageManager.php nut don't work too.

 

I forgot to say, I try to use the fileuploader.js of the 1.5.3 but it doesn't work at all.

Edited by wendsay (see edit history)

Share this post


Link to post
Share on other sites

I had the same problem with prestashop 1.5.4.1 and spent all afternoon on it..

 

but finally the problem was not in the Prestashop itself, but in the configuration of the hosting server (apache in my case).

 

The key configuration is the memory limit (the amount of memory a php script can use).

 

For apache under linux:

 

/etc/php5/apache2/php.ini

 

memory_limit=128M

 

was enought for me.

 

Hope this help someone

Share this post


Link to post
Share on other sites

In my case the issue was caused by the Apache module ModSecurity.

 

I was seeing this in the httpd logs...

 

[Mon Jul 01 01:34:12 2013] [error] [client 98.192.74.101] ModSecurity: Access denied with code 501 (phase 2). Match of "rx (?:^(?:application\\\\/x-www-form-urlencoded(?:;(?:\\\\s?charset\\\\s?=\\\\s?[\\\\w\\\\d\\\\-]{1,18})?)??$|multipart/form-data;)|text/xml)" against "REQUEST_HEADERS:Content-Type" required. [file "/etc/modsecurity2/base_rules/modsecurity_crs_30_http_policy.conf"] [line "69"] [id "960010"] [msg "Request content type is not allowed by policy"] [severity "WARNING"] [tag "POLICY/ENCODING_NOT_ALLOWED"] [hostname "www.domain.com"] [uri "/administration/ajax-tab.php"] [unique_id "UdEU1M8HWHIAAB3X874AAAAM"]

 

I added this to my httpd configuration for the domain, and its working fine.

 

<IfModule mod_security2.c>

SecRuleEngine Off

</IfModule>

 

 

Edit: In your case if you don't run your own server, ask your hoster if they can disable ModSecurity for the domain so at least you can test. It's probably best to just disable this RULE rather than the whole thing.

Edited by rezilient (see edit history)

Share this post


Link to post
Share on other sites

I had this same error for a while now, and today I finally fixed by replacing these 2 files (controllers/admin/AdminImportController.php) and (classes/FileUploader.php) from the latest version prestashop_1.5.4.1 into the version I currently have (1.5.0.15) I hope anyone could find this useful.

  • Like 1

Share this post


Link to post
Share on other sites

@aurora cristina

 

Hi everybody, me and some friends have the version 1.5.4.1 and till now we had lot of problems with the bugs :S since we were practicing and uploading not high resolution pics and not lot of products everything was "fine" but now things are getting serious with the clients and we have now around 100 products with maximum 4 mb quality.. this problem came out!!

 

Is there any really solution or we should give up with prestashop and look for another????

Edited by aurora cristina (see edit history)

Share this post


Link to post
Share on other sites

I had this same error for a while now, and today I finally fixed by replacing these 2 files (controllers/admin/AdminImportController.php) and (classes/FileUploader.php) from the latest version prestashop_1.5.4.1 into the version I currently have (1.5.0.15) I hope anyone could find this useful.

trying this right now!!! crossing fingers :)

Share this post


Link to post
Share on other sites

4mb is way too high for web, I think you should lower the size of the images and save them as 72dpi JPG or PNG (Save for Web if you are using PS) and you should get the image in a good quality under the 1mb. Also check for the permission on the following folders (/img, /tmp, /uploads) sometimes they needed to be chmod 777. I hope this helps you.

 

@aurora cristina

 

Hi everybody, me and some friends have the version 1.5.4.1 and till now we had lot of problems with the bugs :S since we were practicing and uploading not high resolution pics and not lot of products everything was "fine" but now things are getting serious with the clients and we have now around 100 products with maximum 4 mb quality.. this problem came out!!

 

Is there any really solution or we should give up with prestashop and look for another????

  • Like 1

Share this post


Link to post
Share on other sites

4mb is way too high for web, I think you should lower the size of the images and save them as 72dpi JPG or PNG (Save for Web if you are using PS) and you should get the image in a good quality under the 1mb. Also check for the permission on the following folders (/img, /tmp, /uploads) sometimes they needed to be chmod 777. I hope this helps you.

hi juka! thank you so much for your answer!!

And yes you were totally right pictures were way too big, such a pity because i like to see pictures in high quality but looks like it not good,Gave the permissions and i changed resolution to 1000 px and it works fine now :)

Thanks again Juka!!!

  • Like 1

Share this post


Link to post
Share on other sites

No problem! You must be a Graphic Designer, jajaja I have a lot of Graphic Designers who love their images @ 300DPI +, 72dpi & Very High quaility is more than enough for web :)

 

hi juka! thank you so much for your answer!!

And yes you were totally right pictures were way too big, such a pity because i like to see pictures in high quality but looks like it not good,Gave the permissions and i changed resolution to 1000 px and it works fine now :)

Thanks again Juka!!!

  • Like 1

Share this post


Link to post
Share on other sites

PrestaShop can handle ultra high dpi etc... You would need a strong server, but as Juka said, there is no need. In fact, sometimes the ultra high dpi pictures look worse than standard pictures. Remember that your site must be pretty but accessible as well. If the pictures are taking too long to load, people would leave your website.

  • Like 1

Share this post


Link to post
Share on other sites

No problem! You must be a Graphic Designer, jajaja I have a lot of Graphic Designers who love their images @ 300DPI +, 72dpi & Very High quaility is more than enough for web :)

 

hahaha nononono I'm not a Graphic designer but work around Industrial designers so maybe.... It's contagious and i developed a certain "design disease"!! :)

Share this post


Link to post
Share on other sites

PrestaShop can handle ultra high dpi etc... You would need a strong server, but as Juka said, there is no need. In fact, sometimes the ultra high dpi pictures look worse than standard pictures. Remember that your site must be pretty but accessible as well. If the pictures are taking too long to load, people would leave your website.

 

True story!! thumbs up!! ;) Thank you for the advice

  • Like 1

Share this post


Link to post
Share on other sites

In my case I recently purchased a theme from a third party vendor. I uploaded the theme to my webhosting directory, but the permissions were incorrect. Please make certain that your web directories are owned by the proper web account user (in my case www-data). Once the ownership was restored image uploads worked correctly. Also, it is almost never a good idea to change permissions on a web-served directory to 777. This exposes you to major vulnerabilites. I hope this helps someone.

 

Cheers!

  • Like 1

Share this post


Link to post
Share on other sites

I just had same problem with 1.5.4.1.

And it's all resolve by Regenerate all Images.

 

Now I can upload 8 image at a time

Share this post


Link to post
Share on other sites

I got a solution wich worked for me

 

add this to the bottom of the .htaccess

 

SecFilterEngine Off

SecFilterScanPOST Off

 

Just had the same problem. This fixed it for me. Thank you very much!

Share this post


Link to post
Share on other sites

I had the same issue and, in my case, the problem was that I was running Prestashop through php build-in web server (ex: php -S localhost:2000). I changed to run it with apache and the problem is solved.

Edited by cram1010 (see edit history)

Share this post


Link to post
Share on other sites

Hi Guys,

 

Rebuilding my website from scratch after a server failure.

 

Prestashop v 1.5.5.0

 

Seems I can upload images to my homepage and images into categories.

 

When I try to upload product images however, I'm getting the "undefined" error and the following in the console:

 

SyntaxError

fileuploader.js:1098

  1. get stackfunction () { [native code] }
  2. message"Unexpected token <"
  3. set stackfunction () { [native code] }
  4. __proto__Error
Edited by Platetronics (see edit history)

Share this post


Link to post
Share on other sites

 

Hi Guys,

 

Rebuilding my website from scratch after a server failure.

 

Prestashop v 1.5.5.0

 

Seems I can upload images to my homepage and images into categories.

 

When I try to upload product images however, I'm getting the "undefined" error and the following in the console:

 

SyntaxError

fileuploader.js:1098

  1. get stack: function () { [native code] }
  2. message"Unexpected token <"
  3. set stack: function () { [native code] }
  4. __proto__: Error

 

 

I would contact your host about this. It seems to be a syntax error in the connection to the database. See if your host can tell you more and provide any more error logs. 

Share this post


Link to post
Share on other sites

I would contact your host about this. It seems to be a syntax error in the connection to the database. See if your host can tell you more and provide any more error logs. 

Hi Benjamin,

 

I'm convinced this a Prestashop bug, as we can upload images elsewhere on the site.

 

Just discovered I can upload product images, though some still display the "undefined error". We're talking small Jpeg's here 20-50kb... 

Edited by Platetronics (see edit history)

Share this post


Link to post
Share on other sites

It may be, but I don't personally think so. You would need to have some way to replicate it.

 

If you install it locally, it will work. So there is some problem with the server connection to PrestaShop. Yes, there may be something we can do better to prevent it from happening sometimes, but in many cases, the configuration of the server might be weird.

 

If it is a bug then we need to way to reproduce it, or at least have multiple people having the same problem. 

Share this post


Link to post
Share on other sites

I have too problem in Prestashop 1.5.5.

When I upload picture to products, there is error ,, undefined ,, :(

Share this post


Link to post
Share on other sites

Same "undefined" error while uploading article image.

Other images (logo, categories, upload ok).

 

Using Prestashop 1.5.6.0.

 

Tested with Opera, Firefox, Chrome and IE10, with same error result.

 

Solved one time adding php.ini file to the shop hosting root with:

 

allow_url_fopen=On;

 

That was a testing environment. When working on production environment, the activation of url_fopen does nothing, and still cannot upload images.

 

The Firebug console shows:

 

SyntaxError: Unexpected token < {}

 

 

Tested with the CDN Cloudflare on and off, with same results.

 

Please provide a solution, there's a lot of people out there with the same problem. Seems a Prestashop bug...

 

thank you

  • Like 1

Share this post


Link to post
Share on other sites

Same "undefined" error while uploading article image.

Other images (logo, categories, upload ok).

 

Using Prestashop 1.5.6.0.

 

Tested with Opera, Firefox, Chrome and IE10, with same error result.

 

Solved one time adding php.ini file to the shop hosting root with:

 

allow_url_fopen=On;

 

That was a testing environment. When working on production environment, the activation of url_fopen does nothing, and still cannot upload images.

 

The Firebug console shows:

 

SyntaxError: Unexpected token < {}

 

 

Tested with the CDN Cloudflare on and off, with same results.

 

Please provide a solution, there's a lot of people out there with the same problem. Seems a Prestashop bug...

 

thank you

I'm getting the same error even after an upgrade to 1.5.6.0.

 

The most frustrating part is, I can upload certain images to certain products. 

 

So to respectfully reiterate, I believe this is a Prestashop bug.

 

 

 

Neil.

Share this post


Link to post
Share on other sites

Very strange. I saw one post that said that the language was the problem. Here is the quote that says

 

 "the langauge was the problem go to languages and go to BO translation en click save and the problem is gone."

 

Try to do that Localization/Translations/ Click EN flag and click save. 

 

See if that solves the problem.

Share this post


Link to post
Share on other sites

Very strange. I saw one post that said that the language was the problem. Here is the quote that says

 

 "the langauge was the problem go to languages and go to BO translation en click save and the problem is gone."

 

Try to do that Localization/Translations/ Click EN flag and click save. 

 

See if that solves the problem.

 

Hi Benjamin,

 

Just tried your suggestion. Still no go on my system. 

 

One other issue I have now is, I have uploaded an image to a category, the image has uploaded on the back end and is visible. The image isn't displayed on the shop, however. There is only a question mark displayed: http://www.platetronics.org/17-kt150

 

I have successfully uploaded three images to products: http://www.platetronics.org/9-12at7-ecc81http://www.platetronics.org/16-6cg7http://www.platetronics.org/home/9-mullard-12ax7.html 

 

I can even change these images and upload new ones to these three products. 

 

This is now super frustrating, though I'm sure there is a solution.

 

 

 

Neil

Share this post


Link to post
Share on other sites

Hello everyone,

 

I installed Prestashop recently and I have same problem. I have newest version,  I tried all suggested changes in php.ini, and php files and I'm still getting same undefined error when I want to upload product picture... I really love how Prestashop working, but this problem making me so mad, even because I'm not programmer, not native english speaker and loosing days to discover what is wrong :(

Share this post


Link to post
Share on other sites

Hi Benjamin,

 

Just tried your suggestion. Still no go on my system. 

 

One other issue I have now is, I have uploaded an image to a category, the image has uploaded on the back end and is visible. The image isn't displayed on the shop, however. There is only a question mark displayed: http://www.platetronics.org/17-kt150

 

I have successfully uploaded three images to products: http://www.platetronics.org/9-12at7-ecc81http://www.platetronics.org/16-6cg7http://www.platetronics.org/home/9-mullard-12ax7.html

 

I can even change these images and upload new ones to these three products. 

 

This is now super frustrating, though I'm sure there is a solution.

 

 

 

Neil

 

hello

 

go to preferences > images and make sure that you've got image type named "category_default"

Share this post


Link to post
Share on other sites

The problem can't be with the browser - it worked fine on my local server using Firefox1.jpg2.jpg3.jpg4.jpg5.jpg

 

I've tried Opera, Firefox and Chrome on both LINUX and windows. So, no it's not a browser issue. 

Share this post


Link to post
Share on other sites

i checked your website once again

i browsed several categories.

problem appears only for category you mentioned above.

If you for example try to change image for other categories, problem will appear too?

Share this post


Link to post
Share on other sites

Hi Guys,

 

Just an update. With one of my products, I can upload/delete certain images without any issue: http://www.platetronics.org/home/9-mullard-12ax7.html

 

As you can see there are arbitrary images associated here, though it does illustrate I can upload images. Same occurs with: http://www.platetronics.org/home/18-electro-harmonix-gold-6cg7.html

 

Now, the strange thing is, I can't upload the same images to both products as it gives the "Undefined" SyntaxError {} fileuploader.js:1098

 

Strange this is so intermittent. Any suggestions to change the fileloader.js file perhaps?

Share this post


Link to post
Share on other sites

Ive just had this problem, switched from chrome to IE and its fine. Will test and report back if it does it agian.

Share this post


Link to post
Share on other sites

Having the same issue here again, it worked one day uploaded 5 images and now it won't work a bit or when it does I get the question mark.. IE isn't an option on mac so thats out. 

Any ideas if it could be something to do with the host? 

Share this post


Link to post
Share on other sites

Do you remember what specific error you were having? They couldn't find anything like that and tried switching PHP versions with no effect.

Thanks so much!

Share this post


Link to post
Share on other sites

If I remember right something was wrong about ajax not having proper permisions, cause the mod security from apache they had to correct some stuff they knew and worked.

 

I can aske them to be more specific

Share this post


Link to post
Share on other sites

If I remember right something was wrong about ajax not having proper permisions, cause the mod security from apache they had to correct some stuff they knew and worked.

 

I can aske them to be more specific

Thank you! This worked!

 

I e-mailed my web host provider today regarding this issue and quoted your message on my e-mail; they were able to fix it and I no longer have this problem!

Share this post


Link to post
Share on other sites

If I remember right something was wrong about ajax not having proper permisions, cause the mod security from apache they had to correct some stuff they knew and worked.

 

I can aske them to be more specific

 

Any more on the specifics?

 

Thank you! This worked!

 

I e-mailed my web host provider today regarding this issue and quoted your message on my e-mail; they were able to fix it and I no longer have this problem!

 

 

Any specifics on this fix?

Share this post


Link to post
Share on other sites

Any more on the specifics?

 

 

 

Any specifics on this fix?

It appeared that the mod_security was blocking the ajax, all they had to do was disable it (mod_security) on my account. That's all that they did.

Share this post


Link to post
Share on other sites

I'm having this problem too.

 

I get the undefined error when uploading with the console error below \/

 

I have contact my host but after checking that I disabled mod security in Prestashop has said that's not the issue. Is that right? Could there still be a mod security issue even if it's turned off in Prestashop?

 

What else could be causing this error?

 

 

www.mydomain.co.uk/ajax-tab.php?id_product=8&i…dminProducts&action=addImage&ajax=1&legend%5B1%5D=Profile+III&qqfile=1.jpg 406 (Not Acceptable) fileuploader.js:1078
Edited by Brighteyes (see edit history)

Share this post


Link to post
Share on other sites

Problem Solved After replacing the fileuploader.js from the 1.5.6.1 Version with earlier version same file.

 

File can be found on root/js/ ..

 

Worked for me .

Share this post


Link to post
Share on other sites

So where can I find the fileuploader.js file from a previous version, good people?  I can only find how to download the current version.

 

I am having the Undefined problem using XAMPP/localhost and Chrome.  I only started using PS (v1.5.6.1) last week, and everything was going so well until I ran into this.

 

I have :

 - changed the Apache permissions setting with the BO UI

 - changed the PHP.INI to allow bigger files

 - changed the fileuploader.js lines 1075 etc...

 - changed a PHP file according to the instructions I found in one of the many threads about this problem.

...and cleared the cache

 

Changing all that has broken the Images tab in Catalog | Product completely though, so I am going to have to reinstall from scratch, which is a shame as that'll be nearly a weeks work lost.  Lucky it's early days.  All the other tabs in the Product area work, and all the other areas work too, but that one just tends to crash the browser.

Share this post


Link to post
Share on other sites

Brilliant - thank you Benjamin!

 

No, I was adding the very first product as I worked systematically through the documentation, step by step.  I was being very well-behaved because I really like the Prestashop concept, one of my colleagues in the coin business uses it and likes it, and I have just ditched SiteMaker because it's a bag of nuts.  :)

 

So now I am doing a full reinstall - even starting again with XAMPP - and before I even fire it up, I shall replace that fileuploader.js with the older one you kindly pointed me towards...

Share this post


Link to post
Share on other sites

UPDATE: 

 

After doing the full reinstall of XAMPP and everything, I decided not to down grade just that one suspect file (fileuploader.js) to 1.5.6.0, but the whole PrestaShop package, so at least it would be a cohesive package, all at the same version.

 

It worked!

 

So while I'm no techie, not by any stretch of the imagination, I can say that the problem is somewhere in 1.5.6.1.

 

I think I'll stick to the old one for a while.

 

Full steam ahead!  Thanks to all who gave it some thought....

 

Declan : )

 

Share this post


Link to post
Share on other sites

Same problem here too , using prestashop 1.5.6.1. This problem happens mainly when the associations are also on home featured along with categories. Another mistake i notice is when you go to preferences > images and try to edit a category, it returns you back when you click ;save' inspite of there being another button which says 'back to list'.

Edited by indus (see edit history)

Share this post


Link to post
Share on other sites

1.5.6.0 is the one that fixed it for me.  Seems rock solid to a newbie.  Perhaps a "one version behind" strategy is a good one...

Share this post


Link to post
Share on other sites

Hi everyone. I'm new to Prestashop and have just installed 1.5.6.1

 

I had the same problem when uploading an image of my first product. Have tried replacing the "fileloader.js" file with an older version of Prestashop but didn't work. The next approach that I did was to fill in the "Reference" field at the product "Information" tab and I can now upload the same image.

 

Hope this can be one of the solutions that you can try it out

  • Like 1

Share this post


Link to post
Share on other sites

Well, wouldn't that be funny, if the optional reference field fixed it.  Up and running on 1.5.6.0 now though, so I'l be sticking with this version as long as I dare now. 

Share this post


Link to post
Share on other sites

Just have had the same problem but have already solved it.

It wasn't was caused by Prestashop but by Cloudflare "aggressive" caching setting.

 

In details, today I've been experiencing several weird logouts from the admin panel coupled with strange glitches.

Image upload failures with "undefined" and (developer) console returning a 200 (ok) with bad token were all pointing toward external caching.

To quickly solve the problem nothing worked but pausing Cloudflare service (it takes some times to fully propagate changes).

I'm pretty positive most of you are under CDN (either willing or not) since shared hosting massively use it to ease the load on their crowded "boxes".

 

Finally I've also checked the fileuploader.js tweak posted earlier but is unneeded in ver 1.5.6.1 since it's already implemented a more complete solution.

 

Try checking you cache or CDN settings...

Share this post


Link to post
Share on other sites

[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.

  • Like 2

Share this post


Link to post
Share on other sites

I have been having the same undefined error trying to upload images for products only. im on 1.5.6.1 using firefox 26. used many fixes promoted none worked, just tried using IE and I could upload so it must be a firefox related issue for me,  but any suggestions what in firefox might be different than IE that causes the undefined error?

Share this post


Link to post
Share on other sites

I finally solved the problem.
 
locate the fileuploder.js file in /js folder, and change "Content-Type" in line 1075 from "application/x-www-form-urlencoded" to "application/json"

 

it worked for me.

  • Like 2

Share this post


Link to post
Share on other sites

Thanks a lot onahkenneth and Benjamin.

Nice, easy and possible without changing anything in the hosting infrastructure.

 

Share this post


Link to post
Share on other sites

Same Problem here with 1.5.6.1. 

How can they release Versions after Versions without fixing this Major Bug?

The Lord really works in mysterious ways :)

Share this post


Link to post
Share on other sites

Same Problem here with 1.5.6.1. 

How can they release Versions after Versions without fixing this Major Bug?

The Lord really works in mysterious ways :)

 

Hey DonTom, were you able to fix it? I can walk you through how to do it if you need help. 

Share this post


Link to post
Share on other sites

Hi Benjamin

Thanks for your fast answer.

I just installed a shop on my testing site to check the latest version.(I wanted to look how the mobile version looks, damn good by the way). So i'm not in a hurry to fix the problem. :)

(I'm still running with 1.4.6.2) :)
Maybe i better wait for 1.6. until i'm updating the shop?

I wish you a happy new year!

Tom

Share this post


Link to post
Share on other sites

Hi Benjamin,

I've followed the link that you have shared and added the 2 lines while deleting 1 line. Still having the "undefined" problem

Share this post


Link to post
Share on other sites