Jump to content

Product Image upload broken: undefined


Recommended Posts

Hello.

 

I just updated from 1.5.6.0 to 1.5.6.1 and activated all CCC options.

 

Now when I try to upload an image I get an undefined error, and the javascript console reports this:

 

 

Failed to load resource: the server responded with a status of 404 (Not Found) http://<mysite.com>/img/p/es-default-small_default.jpg
Failed to load resource: the server responded with a status of 404 (Not Found) http://<mysite.com>/<admindir>/ajax-tab.php?id_product=410&id_categor…x=1&legend%5B3%5D=MicroSD+16GB+Clase+6+Samsung&qqfile=microsd16gbc6sam.jpg

 

 

 

I've been looking online for a solution but I find none.

 

I disabled the CCC options but I still get the error. I have tried regenerating thumbnails, but I get another error:

 

Cannot write "No picture" image to (%s) images folder. Please check the folder's writing permissions.

 

So it must be something related to permissions I guess. Any answers will be much appreciated.

 

Thanks!

Edited by javilol (see edit history)
Link to comment
Share on other sites

hello

you've got this message:

Failed to load resource: the server responded with a status of 404 (Not Found)

 

 

but for what file it is related?

 

try to change chmod to /img/ directory to 777, recursively (for each subdirectory & file)

Link to comment
Share on other sites

I'm having a similar problem. The error in my console says thus:

 

403 Forbidden

Forbidden
You don't have permission to access /shop/admin/ajax-tab.php
on this server.
Additionally, a 404 Not Found
error was encountered while trying to use an ErrorDocument to handle the request.

 

I looked on the server and the permission for the listed php file was 644 so I tried changing it to 755. Still didn't work. Any other suggestions? I also just updated 1.5.6.0 to 1.5.6.1.

Link to comment
Share on other sites

I'm having a similar problem. The error in my console says thus:

 

403 Forbidden

 

Forbidden

You don't have permission to access /shop/admin/ajax-tab.php

on this server.

Additionally, a 404 Not Found

error was encountered while trying to use an ErrorDocument to handle the request.

 

I looked on the server and the permission for the listed php file was 644 so I tried changing it to 755. Still didn't work. Any other suggestions? I also just updated 1.5.6.0 to 1.5.6.1.

 

Hi, did the Github fix work for you?

Link to comment
Share on other sites

Hello there, I have the same problem. Can't get it work, using prestashop 1.5.6. Also tried github fix and didn't help. Asked hosting service to turn off mod_security didn't help... going crazy with this! Tried IE, Firefox, Chrome...Any body got fix for this?

[Wed Nov 27 22:10:44 2013] [error] [client 93.142.199.173] ModSecurity: Access denied with code 406 (phase 1). Match of "rx ^%{tx.allowed_request_content_type}$" against "TX:0" required. [file "/usr/local/apache/conf/crs/activated_rules/modsecurity_crs_30_http_policy.conf"] [line "64"] [id "960010"] [msg "Request content type is not allowed by policy"] [data "application/octet-stream"] [severity "WARNING"] [tag "POLICY/ENCODING_NOT_ALLOWED"] [tag "WASCTC/WASC-20"] [tag "OWASP_TOP_10/A1"] [tag "OWASP_AppSensor/EE2"] [tag "PCI/12.1"] [hostname "xxxx.com"] [uri "/admin123/ajax-tab.php"] [unique_id "UpZf1E4uY2oACy3WbkwAAABd"]
Edited by tarantoo (see edit history)
Link to comment
Share on other sites

 

Hello there, I have the same problem. Can't get it work, using prestashop 1.5.6. Also tried github fix and didn't help. Asked hosting service to turn off mod_security didn't help... going crazy with this! Tried IE, Firefox, Chrome...Any body got fix for this?

[Wed Nov 27 22:10:44 2013] [error] [client 93.142.199.173] ModSecurity: Access denied with code 406 (phase 1). Match of "rx ^%{tx.allowed_request_content_type}$" against "TX:0" required. [file "/usr/local/apache/conf/crs/activated_rules/modsecurity_crs_30_http_policy.conf"] [line "64"] [id "960010"] [msg "Request content type is not allowed by policy"] [data "application/octet-stream"] [severity "WARNING"] [tag "POLICY/ENCODING_NOT_ALLOWED"] [tag "WASCTC/WASC-20"] [tag "OWASP_TOP_10/A1"] [tag "OWASP_AppSensor/EE2"] [tag "PCI/12.1"] [hostname "xxxx.com"] [uri "/admin123/ajax-tab.php"] [unique_id "UpZf1E4uY2oACy3WbkwAAABd"]

 

I think you should double check with your hosting provider because this 406 error is only concerning your Server security and permissions. Which hosting are you using? mod_security can be tricky to turn off some rules. 

Link to comment
Share on other sites

bom dia

 

pedi ao fornecedor de conta de alojamento para Desativar o Mod_Security na conta de alojamento para verificar se seria alguma regra do respetivo mod_security. Era mesmo essa a questão e ficou assim solucionado.

 

<não vale a pena fazer o reverter para a versão antiga que mesmo assim não se consegue enviar fotos

 

Espero que assim resolvam

abraço

joao fernando

  • Thanks 1
Link to comment
Share on other sites

I think you should double check with your hosting provider because this 406 error is only concerning your Server security and permissions. Which hosting are you using? mod_security can be tricky to turn off some rules. 

This error was given to me by my hosting team before they turned of mod_security, I have croatian hosting, service is fast and excelent, I get respond always under 1 hour. They know what they are doing because I have more that 10 clients on that site, and there was no problem or if there was any it was solved the same day by hosting team.

 

For now image upload is only working with fresh installed IE.

 

Problem was tested od 3 different PCs, in 3 countries using Chrome, Firefox, Opera and IE, win Xp, win 7, win 8. Something is wrong with prestashop, and more I search google for this problem, more I realise nobody really knows whats the problem.

  • Like 1
Link to comment
Share on other sites

  • 9 months later...
×
×
  • Create New...