Announcement

#1 2012-01-07 22:38:34

jkn
Guest

Column 'name' cannot be null

Hi all!

I have been updating my images IPTC-tags and upated them in Piwigo with Batch manager and "Synchronize metadata". Everything has worked fine for hundres of images but now there are 2 images which I cannot update to Piwigo. When updating following error appears:

arning: [mysql error 1048] Column 'name' cannot be null

INSERT  INTO piwigo_tags
  (name,url_name)
  VALUES(NULL,NULL) in /var/www/piwigo/include/dblayer/functions_mysql.inc.php on line 767

I'm using Piwigo with Chrome 15.0.875.15 on Win7 X64 and Piwigo server is:
Piwigo 2.3.2
Operating system: Linux
PHP: 5.3.5-1ubuntu7.2 (Show info) [2012-01-07 23:33:41]
mysql: 5.1.54-1ubuntu4 [2012-01-07 23:33:41]
Graphics Library: ImageMagick 6.6.2-6

Thanks in advance,
    Jouni

 

#2 2012-01-07 23:16:04

plg
Piwigo Team
Nantes, France, Europe
2002-04-05
13177

Re: Column 'name' cannot be null

Hi jkn,

can you send me the photo please? by email, "plg" on this website domain name.


Latest blog post (November 9th 2018) Why Flickr could not remain free for ever

Offline

 

#3 2012-01-08 09:06:20

jkn
Guest

Re: Column 'name' cannot be null

Hi plg!

I sent you an email with one picture which is not working.

Yours,
     Jouni

 

#4 2012-01-10 11:58:06

jkn
Member
2012-01-10
2

Re: Column 'name' cannot be null

The same error occured again. This time in Tools->Synchronize. I had deleted few photos from hard disk and then went to synchronize to delete them from Piwigo too.
First I run synchronize with simulate and everything was OK, but real run throwed exactly same error.

Offline

 

#5 2012-01-10 13:55:27

plg
Piwigo Team
Nantes, France, Europe
2002-04-05
13177

Re: Column 'name' cannot be null

OK, the problem is that the keywords in your IPTC look like:

first keyword.,second keyword

Because the dot "." is considered as a keyword separator, Piwigo understands this string as a 3-keyword string : {'first keyword', '', 'second keyword'} and the database doesn't like the empty keyword.

I will fix it for Piwigo 2.3.3. For now, you can open admin/include/function_metadata.php, line 60, after :

Code:

    $iptc['keywords'] = preg_replace('/[.;]/', ',', $iptc['keywords']);

insert

Code:

    $iptc['keywords'] = preg_replace('/,+/', ',', $iptc['keywords']);

Latest blog post (November 9th 2018) Why Flickr could not remain free for ever

Offline

 

#6 2012-01-10 13:59:30

plg
Piwigo Team
Nantes, France, Europe
2002-04-05
13177

Re: Column 'name' cannot be null

That's "funny" because I've found an old bug (not closed yet) in the bugtracker which gives the same correction in the code : [Bugtracker, ticket 559, fixed] duplicate insert on tags when synchronizing metadata


Latest blog post (November 9th 2018) Why Flickr could not remain free for ever

Offline

 

#7 2012-01-11 21:43:49

jkn
Member
2012-01-10
2

Re: Column 'name' cannot be null

Thanks! Synchronizing metadata is working fine now!

You can now close that old bug soon too!

- Jouni

Last edited by jkn (2012-01-11 21:44:28)

Offline

 

#8 2012-01-11 21:58:45

plg
Piwigo Team
Nantes, France, Europe
2002-04-05
13177

Re: Column 'name' cannot be null

Thanks for your feedback


Latest blog post (November 9th 2018) Why Flickr could not remain free for ever

Offline

 

Board footer

Powered by FluxBB

github twitter facebook google+ newsletter Donate Piwigo.org © 2002-2018 · Contact