Loading...
 
Skip to main content

Features / Usability


1.8RC3 image gallery scaled images sql error

Hi,

I'm playing around with a 1.8RC3 Tikiwiki and tried to set up an image gallery with scaled images (to 800x600).

I'm using GD as graphics library (imagemagick is not installed).

Whenever I try to view a scaled image, Tiki throws a mysql error like the following:

Input Array does not match ?: select i.`imageId`, i.`galleryId`, i.`name`, i.`description`, i.`created`, i.`user`, i.`hits`, i.`path`, d.`xsize`,d.`ysize`,d.`type`,d.`filesize`, d.`filetype`,d.`filename` from `tiki_images` i, `tiki_images_data` d where i.`imageId`=4 and d.`imageId`=i.`imageId` and d.`type`='s' and d.`xsize`=600 and d.`ysize`=

Warning: error: You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 9 in query:
select i.`imageId`, i.`galleryId`, i.`name`, i.`description`, i.`created`, i.`user`, i.`hits`, i.`path`, d.`xsize`,d.`ysize`,d.`type`,d.`filesize`, d.`filetype`,d.`filename` from `tiki_images` i, `tiki_images_data` d where i.`imageId`=? and d.`imageId`=i.`imageId` and d.`type`=? and d.`xsize`=? and d.`ysize`=?
in /data/webroot/tiki/lib/tikidblib.php on line 125
Values:
Array ( 0 => 4 1 => s 2 => 600 )
$result is false
$result is empty


Anyone hit by something similar?

I don't know of the error message is truncated, but if not it seems the ysize is not set?

Alex.

Hi Alex,

Ive had a quick glance at the code looks like maybe some logic is out of place in the library. I'll need to setup a test environment this evening and look at this in more depth!

Unless you have already corrected and have a fix for us ? 😉

Thanks 😊

Damian

Hi, Damian:
> Unless you have already corrected and have a fix for us ? 😉

Unfortunately not.

What I have noticed while looking at the error message: It seems an image of type "s" is requested (...and d.`type`='s'...), but my tiki_images_data table only contains images of type o and t. Should the scaled images be created when the image is uploaded to the gallery?

Oh, yes, I use an image directory instead of storing the images to the database, but as the thumbnails are in the DB just fine that should probably not be a problem in itself.

Alex.


Hi, Damian:
> Unless you have already corrected and have a fix for us ? 😉

Unfortunately not.

What I have noticed while looking at the error message: It seems an image of type "s" is requested (...and d.`type`='s'...), but my tiki_images_data table only contains images of type o and t. Should the scaled images be created when the image is uploaded to the gallery?

Oh, yes, I use an image directory instead of storing the images to the database, but as the thumbnails are in the DB just fine that should probably not be a problem in itself.

Alex.