Loading...
 
Skip to main content

Features / Usability


show_image mysql error: Duplicate entry

show_image.php is giving a database error when showing a thumb nail. This only occurs on images of an odd shape in tikiwiki-1.9.2

Viewing the thumbnail in a page gives a broken image icon, but viewing it in a browser shows that a database error is the cause:

Image
Copy to clipboard
Warning: mysql error: Duplicate entry '1189-200-80-t' for key 1 in query: insert into `tiki_images_data`(`imageId`,`xsize`,`ysize`, `type`,`filesize`,`filetype`,`filename`,`data`) values (?,?,?,?,?,?,?,?) in /home/sk8m8ne/public_html/tiki/lib/tikidblib.php on line 134


The database does have the duplicate the script refers to
Table: tiki_images_data

imageIdxsizeysizetypefilesizefiletypefilenamedataetag
1189800318o106621image/pjpeg2parkpancopy.jpgBLOB - 0 Bytesb5b970412cc6718ff840b7610977470c
118920080t3987image/pjpeg200x80_2parkpancopy.jpgBLOB - 0 BytesNULL
000t0NULLx_BLOB - 0 BytesNULL
0200150t0NULL200x150_BLOB - 0 BytesNULL

The last two look like bad news, deleting them makes no difference and they did not re appear on adding the image again.
Here is the example imageThumbnailQuestionFull imageQuestion

Any help would be gratefully accepted.

I am still getting this problem. Even if I add a thumbnail to the upload it gives the database error.

Happens on my linux hosted system and my windows system even with a new tiki install.

Running tikiwiki-1.9.2

Any sugestions on where to look.


Found the cause to be the thumbnail scale was set to 200 x 150 once set to 200 x 200 all ok.

This looks like a bug that perhaps should be reported how do I do that?


Interesting bug. Will try to fix it as I have to do some job on the image galleries
Meanwhile, can you add this bug to dev.tw.org
sylvie