forum.coppermine-gallery.net

Dev Board => cpg1.4 Testing/Bugs => cpg1.4 Testing/Bugs: FIXED/CLOSED => Topic started by: Tranz on September 24, 2005, 09:19:29 pm

Title: critical error when there is a single quote in album keyword field
Post by: Tranz on September 24, 2005, 09:19:29 pm
When there is a single quote in an album keyword field, the page on which exists the album sustains a critical error:
Quote
While executing query "SELECT count(pid) AS link_pic_count
                      FROM cpg11d_pictures
                        WHERE aid != 77 AND
                        keywords LIKE '%'Darcy'%' AND
                        approved = 'YES'" on 0

mySQL 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 'Darcy'%' AND
                        approved = 'YES'' at line

We could tell people to avoid using single quotes, but is there another way to handle this?
Title: Re: critical error when there is a single quote in album keyword field
Post by: artistsinhawaii on September 24, 2005, 09:50:23 pm
TranzNDance,

It's a known issue or bug. I reported on it here: http://forum.coppermine-gallery.net/index.php?topic=20853.0

There are other issues with keywords in 1.4x as well.  Japanese character sets, whether separated with a space or by quotes still read as ONE keyword.  Search.php lists keyword phrases such as "one potato" that have been braced with quotes (")  as "one  and potato".

Dennis 
Title: Re: critical error when there is a single quote in album keyword field
Post by: Tranz on September 25, 2005, 01:18:52 am
I found your post before I posted mine. :) However, you wrote about it in a thread that I didn't think was really related. For bug tracking, I thought it would be better to create a separate report. But if it's considered a keyword issue in general, this could be merged, I guess.
Title: Re: critical error when there is a single quote in album keyword field
Post by: Aditya Mooley on September 26, 2005, 11:59:12 am
Added fix for bug and committed to CVS.
Please confirm the fix.
Title: Re: critical error when there is a single quote in album keyword field
Post by: artistsinhawaii on September 29, 2005, 12:43:13 am
Added fix for bug and committed to CVS.
Please confirm the fix.

Works for me. 

See additional notes on special characters in keyword fieds here:  http://forum.coppermine-gallery.net/index.php?topic=20853.msg101849#msg101849


Dennis