pakmafia Posted June 16, 2015 Share Posted June 16, 2015 I am going nuts trying to figure out what is causing this issue. - Latest prestashop PrestaShop™ 1.6.0.14 - 0.530s - 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 More sharing options...
vincegouh Posted June 19, 2015 Share Posted June 19, 2015 Same problem here, did you find the solution? Link to comment Share on other sites More sharing options...
nuno.dinis Posted July 1, 2015 Share Posted July 1, 2015 I have the same problem and this post help me a lot! Link to comment Share on other sites More sharing options...
mondialshop Posted July 25, 2015 Share Posted July 25, 2015 SOLVED: if the problem is for some products have the solution, if it is for all even in this case there is the solution but are lost uploaded images. Link to comment Share on other sites More sharing options...
qgery Posted July 29, 2015 Share Posted July 29, 2015 (edited) 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'; Edited July 29, 2015 by qgery (see edit history) 5 Link to comment Share on other sites More sharing options...
WEMS Posted July 29, 2015 Share Posted July 29, 2015 (edited) 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 July 29, 2015 by [email protected] (see edit history) Link to comment Share on other sites More sharing options...
nuno.dinis Posted July 30, 2015 Share Posted July 30, 2015 Check this: I have the same problem and this post help me a lot! Link to comment Share on other sites More sharing options...
WEMS Posted July 30, 2015 Share Posted July 30, 2015 Check this: This is the first page I check and this not help me. Link to comment Share on other sites More sharing options...
nuno.dinis Posted July 30, 2015 Share Posted July 30, 2015 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'; Checked if the tables are this way? 1 Link to comment Share on other sites More sharing options...
WEMS Posted July 30, 2015 Share Posted July 30, 2015 Checked if the tables are this way? I find "ps_image" and "ps_image_shop" in the database but I do no understand what I can do there and how I can change or check the values. Link to comment Share on other sites More sharing options...
nuno.dinis Posted July 30, 2015 Share Posted July 30, 2015 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.. Link to comment Share on other sites More sharing options...
WEMS Posted July 30, 2015 Share Posted July 30, 2015 (edited) 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 July 30, 2015 by [email protected] (see edit history) Link to comment Share on other sites More sharing options...
WEMS Posted July 30, 2015 Share Posted July 30, 2015 Someone else can help for this issue ? Link to comment Share on other sites More sharing options...
WEMS Posted July 31, 2015 Share Posted July 31, 2015 I find a solution by putting also the old backup of the database with the same date of the backup files. Issue solved. Link to comment Share on other sites More sharing options...
rdeval Posted August 17, 2015 Share Posted August 17, 2015 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 1 Link to comment Share on other sites More sharing options...
webmasterdevil Posted August 19, 2015 Share Posted August 19, 2015 (edited) Maybe you want to try check the structure of tables ps_image and ps_image_shop and alter the cover images index to normal, instead of unique.I did that and problems solved Edited August 19, 2015 by webmasterdevil (see edit history) 2 Link to comment Share on other sites More sharing options...
InnovatecInc Posted August 20, 2015 Share Posted August 20, 2015 Just noticed the issue on those tables today when migrating images across and 'duplicate key' appearing. So this issue in endemic in PS 1.6.10? They don't rush hotfixes for PS?? 1 Link to comment Share on other sites More sharing options...
ngk1955 Posted September 1, 2015 Share Posted September 1, 2015 Can you please provide more detailed explanation on this solution? I find a solution by putting also the old backup of the database with the same date of the backup files. Issue solved. Link to comment Share on other sites More sharing options...
rdeval Posted September 1, 2015 Share Posted September 1, 2015 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 More sharing options...
wremacle Posted October 25, 2015 Share Posted October 25, 2015 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! This solved my issues! Link to comment Share on other sites More sharing options...
Dasher3000 Posted December 17, 2015 Share Posted December 17, 2015 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 More sharing options...
sting5 Posted November 22, 2016 Share Posted November 22, 2016 Maybe you want to try check the structure of tables ps_image and ps_image_shop and alter the cover images index to normal, instead of unique. I did that and problems solved Thank You webmasterdevil! Saved me from a bunch of headache today! Link to comment Share on other sites More sharing options...
Jignesh.aakoliya Posted November 25, 2016 Share Posted November 25, 2016 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 More sharing options...
zanpo Posted December 11, 2017 Share Posted December 11, 2017 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. Link to comment Share on other sites More sharing options...
Pecatum Posted February 22, 2018 Share Posted February 22, 2018 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. 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...: 1 Link to comment Share on other sites More sharing options...
carmine55 Posted April 4, 2018 Share Posted April 4, 2018 (edited) 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 Edited April 4, 2018 by carmine55 modifica testo (see edit history) Link to comment Share on other sites More sharing options...
ecentury Posted September 24 Share Posted September 24 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 Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now