Characters in embedded keywords causing truncation and insertion problems

davva

Joined: 2009-06-02
Posts: 2
Posted: Tue, 2009-06-02 22:42

Hi,

I use some characters in the embedded keywords that seem to cause issues with the DB insertion.

å,ä,ö,Å,Ä,Ö (ascii representation is 134,132,148,143,142,153) seem to cause a truncation of the keyword somewhere in the insertion process after that the complete word has been identified as a new unique entry in the "tags" table.

var/logs/{date}.log.php say this:

2009-06-02 22:52:48 +02:00 --- error: Uncaught Kohana_Database_Exception: There was an SQL error: Duplicate entry 'Str' for key 2 - INSERT INTO `g3bt1tags` (`name`, `count`) VALUES ('Strömstare', 0) in file system/libraries/drivers/Database/Mysqli.php on line 142

The code used is from a snapshot about 1 hour prior to this post.

Thanks for a really promising gallery solution!

Regards,
David

 
bharat
bharat's picture

Joined: 2002-05-21
Posts: 7994
Posted: Fri, 2009-06-05 04:21

When you say "embedded keywords" do you mean keywords in EXIF tags? If so, can you provide a link to a file with these keywords?

---
Gallery 3 problems? Check gallery3/var/logs before you post!
Gallery 3 latest code: http://github.com/gallery/gallery3/zipball/master
Gallery 3 from git: http://codex.gallery2.org/Gallery:Using_Git

 
davva

Joined: 2009-06-02
Posts: 2
Posted: Sat, 2009-06-06 11:07

Exactly, in the Exif. Here's a .jpg which contain those kind of keywords:

http://www.davva.se/main.php?g2_itemId=358

When only inserting one you will not have the problem, it is when you have several images containing the same keyword (assuming that the keyword contains these kind of characters).

If you try to insert this picture several times you will get the problem. Actually i think that the problem was there in Gallery2 but due to different handling you were able to upload the image. The only thing was that the keyword was truncated.

Thanks!

/David

 
bharat
bharat's picture

Joined: 2002-05-21
Posts: 7994
Posted: Sat, 2009-06-06 20:20

Ticket filed: http://apps.sourceforge.net/trac/gallery/ticket/358 -- thanks!
---
Problems? Check gallery3/var/logs before you post! and file bugs here!
Latest zip: http://github.com/gallery/gallery3/zipball/master
Latest git: http://codex.gallery2.org/Gallery:Using_Git

 
Fredric

Joined: 2010-10-06
Posts: 1
Posted: Thu, 2010-10-07 15:52

Hi, I have the same problem now with the popular tags and photo description being scrambled, the IPTC data module works fine except for the formatting of the keywords.
The filenamne shown under the picture can hold the ÅÄÖ, but on the next line the description get scrambled. Do anyone know a workaround?

Regards,

Fredric