Announcement

#1 2016-01-01 00:25:58

lowend
Guest

Migration from Gallery3 - mysql error: 'anonymous_id' cannot be null

Hi folks.  I started yesterday to see if I could get my gallery3 install migrated to piwigo.  Getting the albums / photos moved over wasn't that bad (except for same special character problems ...) but I can't get the gallery3 database with the comments, etc., into the piwigo database using the plugin.  The text of the warning is below.

I'm not a php person, but I can read perl fair enough.  I looked at the the old perl script that the plugin came from, and there's not even an anonymous_id column listed when the INSERT INTO is generated.  Am I missing something in the original gallery3 database?

Any help is appreciated.

-----------

Warning:  [mysql error 1048] Column 'anonymous_id' cannot be null

INSERT  INTO piwigo_comments
  (image_id,date,author,author_id,anonymous_id,email,website_url,content,validated)
  VALUES('857','2005-02-20 22:36:31','mad bushwacker','2',NULL,'unknown@nobody.com',NULL,'cactu-licious!','true') ..... etc ...... in path/include/dblayer/functions_mysqli.inc.php on line 830


Warning: Cannot modify header information - headers already sent by (output started at /path/include/dblayer/functions_mysqli.inc.php:829) in path/include/page_header.php on line 101
------------
Piwigo version: 2.7.4
PHP version: 5.5.30
MySQL version: 5.7.10
Piwigo URL: testing--local only

 

#2 2016-01-01 00:47:34

lowend
Guest

Re: Migration from Gallery3 - mysql error: 'anonymous_id' cannot be null

Ok, I knew as soon as I actually broke down and asked the question I'd figure it out.

I don't know if this is a GOOD solution, but I did poke through the plugin code and found that it looked like anonymous_id came from the server_remote_host column in the gallery3 columns table.  In my gallery3 database, all those values are null (at least all the comments entered in the original gallery1 install were -- oops didn't check that the gallery3 columns were null).  I set them equal to the ip address in server_http_host (which was NOT null).  Now that anonymous_id has a value in it, everything was imported and my comments are showing up.

 

Board footer

Powered by FluxBB

github twitter newsletter Donate Piwigo.org © 2002-2022 · Contact