Jump to content

Error while creating additional image


Recommended Posts

I am going nuts trying to figure out what is causing this issue.

 

- Latest prestashop

 

- Problem

when i try to add an image to a new or existing product i get the error imagename: Error while creating additional image

 

Solutions tried so far

- I have tried cleaning the database

- have changed permissions of /img to 777

- I changed size of the image to less than 50kb

 

nothing has worked so far please HELP

Link to comment
Share on other sites

  • 2 weeks later...
  • 4 weeks later...

Unfortunately last Friday my Hosting Server was hacked by a trojan. After installing a 4 week old file backup I have the same problem. Never had it before...

The products added between this time have no image. When I try to add images I get this error "Error while creating additional image". Same when I try to add a new products.

 

Unfortunately I can't find a solution in the actual forums that find solutions.

 

Can someone help ?

Edited by [email protected] (see edit history)
Link to comment
Share on other sites

In the table list, on line of table ps_image click on 'Structure' and checks if the field's type correspond to the above topic.

Do the same for table ps_image_shop..

Table: ps_image: cover

tinyint(1)

 

UNSIGNED

Yes

NULL

 

 

Table: ps_image_shop: 

cover

tinyint(1)

 

UNSIGNED

Yes

NULL

 

 

This is what I have. I change DEFAULT NULL to '0'; in the both. Still have the error message: Error while creating additional image

Edited by [email protected] (see edit history)
Link to comment
Share on other sites

  • 3 weeks later...

Hi guys,

 

Any solution without having to go back to an old backup?

All the solutions commented before doesn't work on my case.

  • Folder permision is OK
  • Database structure and types is OK
  • Database verification gets no error at all
  • If we delete some images, then it lets you sometimes to upload a new one, but not anymore after accomplish it.

The error we get before activating the debug mode is "Error while creating additional image" and after activate the debug mode the error is "Unexpected token <"

Any idea?

Raúl

  • Like 1
Link to comment
Share on other sites

  • 2 weeks later...

I get the problem solved this way:

 

I get the last SQL backup and make a copy of the file.
I edit the SQL backup file just leaving the image tables structures and data, deleting all the other tables and data to avoid loose other information.

After restoring this SQL file with just the image information, all works fine again.

Maybe the error gets on some corrupted image data or the table structure (but not find the error manually... I see it perfect before make this)

 

Hope it helps you guys!

Raúl

Link to comment
Share on other sites

  • 1 month later...
  • 1 month later...

We have at least temporarily solved this by DROPping and editing INDEXes related to "cover" image.

 

1. We DROPped INDEX id_product_cover from ps_image indexes.

2. Also: we set to IGNORE the "cover" field of the INDEX id_image in the ps_image_shop table.

 

This allowed us to upload, but I think you will need to recreate these indexes to get all the functionality to work.

 

We noticed this created a bug (but it all works fine once you know the bug):

     1. The "COVER" checkbox will DELETE that image -- so you can use it for that - Click SAVE and STAY to delete the selected image.

     2. The LAST image you upload will be your COVER image.

      ** All your uploaded images will be marked "Cover" image...

 

Hope that helps someone.

- Dasher

Link to comment
Share on other sites

  • 11 months later...

You need to check if cover value form ps_image, and ps_image_shop if it is set to 0 then make it NULL by making following query.

 

ALTER TABLE `ps_image` CHANGE `cover` `cover` TINYINT(1) UNSIGNED NULL DEFAULT '0';

ALTER TABLE `ps_image_shop` CHANGE `cover` `cover` TINYINT(1) UNSIGNED NULL DEFAULT '0';

 

Thanks

Jigneshkumar

Link to comment
Share on other sites

  • 1 year later...

In my case the problem appeared when I decided to change all the existing image from a product. I didn't delete the images from the server, only un-ticked the checkboxes so they don't appear in the product page. Also there was no cover image box checked. When I tried to upload the new images, the error appeared. So I simply checked the tickboxes only for 1 of the product image, saved, then uploaded the new images. Worked like a charm. No database altering needed, or innodb log file increase.

Untitled.png

Link to comment
Share on other sites

  • 2 months later...
On 11/12/2017 at 9:13 PM, zanpo said:

In my case the problem appeared when I decided to change all the existing image from a product. I didn't delete the images from the server, only un-ticked the checkboxes so they don't appear in the product page. Also there was no cover image box checked. When I tried to upload the new images, the error appeared. So I simply checked the tickboxes only for 1 of the product image, saved, then uploaded the new images. Worked like a charm. No database altering needed, or innodb log file increase.

Untitled.png

 

Hi, 

I had the same problem and did something similar, but not exactly the same. 

First of all, I have Multistore enabled. So when I was trying to upload new pictures to a new product, I only had the shop corresponding to that product.

So I thought: "Let's try choosing All shops" (I guess that's the name for it, in Spanish is "Todas las tiendas"). After that I tried again and ticked no pictures, saved and ticked all pictures again. I uploaded a new picture and it worked. I then tried to delete old pictures from that product and it also worked.

So it seems to work now. Anyway, I found the following bug: the "Position" for each picture is sometimes duplicated. I guess that's the cause of the problem. Looks like Prestashop messes up with the positions when Multistore is enabled...:

image.thumb.png.69c5accf8c7f0b52bd10fef5919b88b7.png

  • Like 1
Link to comment
Share on other sites

  • 1 month later...

Buongiorno,

Ho un problema con la versione 1.6.0.14 prestashop improvvisamente non carica piu 'immagini sulla scheda prodotti back office prestashop.  Tutte le altre immagini caricate fino ad oggi sono ancora perfette. La prima immagine nella scheda prodotti back office prestashop me la fa aggiungere ma poi non c'e' verso di aggiungerne altre ancora.Grazie

Cattura.thumb.PNG.4a5985da90e75132f789726bafb8bf6c.PNG

Edited by carmine55
modifica testo (see edit history)
Link to comment
Share on other sites

  • 6 years later...

For me, the solution to the "an error occurred while creating an additional image"

was that there was no entry for this image in this table:

ps_image_shop

There was an entry for one of the multi shops, but not the other one. So added row as can be seen in the image

This also shows that maybe your database needs a bit of maintenance and clearing out to improve performance

hope that helps someone

error-2.jpg

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