keyword field too short when importing from G2 to G3

pascal622

Joined: 2004-03-12
Posts: 10
Posted: Wed, 2009-06-17 08:01

Hello,

I'm importing a G2 gallery to G3. G3 has already imported more than 1650 pictures from my G2 installation (more than 5500 pictures), and it stucks.

I'm using the G3 code from 2009-06-15.

If I look at the log file I have the following error :

2009-06-17 07:40:57 +02:00 --- error: Uncaught Kohana_Database_Exception: There was an SQL error: Duplicate entry 'conditionneur thermique double ctid 520 rivalor suisse installat' for key 2 - INSERT INTO `tags` (`name`, `count`) VALUES ('conditionneur thermique double ctid 520 rivalor suisse installation gris rouge', 0) in file D:/wwwroot/tools/gallery3/system/libraries/drivers/Database/Mysqli.php on line 142

It appears that the 'name' field of the 'tags' table is too short to save my old G2 keywords.

In G3 the 'name' field for 'tags' table is 64 characters length.
In G2 the 'g_keywords' field for 'g2_item' table is 255 characters length.

I have increased the size of the 'name' field and the import resume without error.

Have a nice day !
Pascal

 
bharat
bharat's picture

Joined: 2002-05-21
Posts: 7994
Posted: Fri, 2009-06-19 17:08

The problem here is that we're not splitting your tags by the space character, so those are all getting saved as one big tag. You'll see when your import is done that you have some very weird tags in your system. We should split on spaces. Would you please file a bug for this? Thanks!

---
Problems: Check gallery3/var/logs first!
file a bug or feature request | upgrade to the latest code | use git

 
pascal622

Joined: 2004-03-12
Posts: 10
Posted: Mon, 2009-06-22 06:36

Yes, I saw that in the tags cloud and tags list. I've filed a bug (#454) for this.

 
bharat
bharat's picture

Joined: 2002-05-21
Posts: 7994
Posted: Mon, 2009-06-22 18:26

This is now fixed in the latest code.
---
Problems? Check gallery3/var/logs
bugs/feature req's | upgrade to the latest code | use git | help! vote!

 
pascal622

Joined: 2004-03-12
Posts: 10
Posted: Tue, 2009-06-23 11:59

Great ! You are super fast...

I will download it and proceed to a new import.

Thanks a lot Bharat (for all your efforts in developping this great tool).

Pascal