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
Hi jkn,
can you send me the photo please? by email, "plg" on this website domain name.
Offline
Hi plg!
I sent you an email with one picture which is not working.
Yours,
Jouni
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
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 :
$iptc['keywords'] = preg_replace('/[.;]/', ',', $iptc['keywords']);
insert
$iptc['keywords'] = preg_replace('/,+/', ',', $iptc['keywords']);
Offline
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
Offline
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
Thanks for your feedback
Offline