Announcement

#106 2019-06-05 19:57:23

magscanner
Member
2019-06-01
7

Re: FAQ? Migrating from gallery 2 to piwigo

Gallery II migration with HTML in Descriptions:

After some effort I was able to migrate my Gallery 2.2.4 to piwigo (see www.mkpix.org/piwigo ). However, my description fields all contain HTML, and all the tags were converted to entities, and these then showed as their character values. I found that  como  had fixed this 2014-11-22 in admin.php. His fix is still valid but needs a slight update.

Since that time there have been other changes in admin.php, and the lines and variables have changed. If you want to preserve HTML in descriptions etc., new version starts at line 256 and follows:

    //    $title = m2p_remove_bbcode($item['title']);      HTML entity fix 2019-06-05  3 places below
    $title = m2p_remove_bbcode(html_entity_decode($item['title']));
      if (empty($title))
      {
        $title = $item['pathComponent'];
      }

      // todo: maybe as a user input field, choose replace or remove
//      $summary = m2p_replace_bbcode($item['summary']);        HTML entity fix
//      $description = m2p_replace_bbcode($item['description']);    HTML entity fix
     $summary = m2p_remove_bbcode(html_entity_decode($item['summary']));
         $description = m2p_remove_bbcode(html_entity_decode($item['description']));

I don't know, maybe this should be the standard version? We put the HTML in the descriptions to make things fancy. I didn't see where the HTML tags were getting converted to entities, but I know very little about PHP.

Offline

 

#107 2020-12-11 01:24:53

PeaceFreak
Member
2020-12-10
4

Re: FAQ? Migrating from gallery 2 to piwigo

Hello Everyone!

I am in the process of moving a two language Menalto Gallery (English & Japanese) to Piwigo.

I've installed the Menalto2Piwigo plugin but was not sure about the instructions, so this is what happened to me, and my suggestions to improve the plugin...

Firstly, on the "How to use it?" page there are fields to put in database details that already had some of my Piwigo database info. That seemed strange so I put in my Menalto Gallery database info. For such an important task, not having specific instructions as to what database to use was confusing to me.

Next, it took me a while to realize that the word "Synchronise" was a button. (Suggestion: I think it should be highlighted as such.)

There were three Syncronize Errors (wrong filename). I found the filenames in the data file, eliminated the spaces and that fixed it.

In the "Synchronise" window, the fields are reasonably self-explanatory but I was not sure what, "add new photos to basket" means. I've never used Piwigo before.

Further down I see, "reduce to single existing album" with a list of all the albums in my Menalto Gallery. This seemed scary to me. All those albums will be reduced to one? A short explanation would be good here.

Anyway, I clicked the Submit button.

I was taken to a page that had a "Some checksums are missing." button. (Didn't realize it was a button at first!). I clicked on that and somehow muddled my way through it... I'm not a programmer, so what the concept of checksums is unknown to me. Some instructions on what to do on that page would be great for me and for future users who don't know about such things...

Anyway, it seems like all my pictures have been imported and from now I will try to use the Extended Descriptions plugin setup.

Also, on the first page, step 3, Submit the form at the end of this page. Why not change it to: Click on the "Start Import" button at the bottom of this page.

BTW, that "Start Import" button disappears once you click on Step 2, Synchronise, so perhaps there should be instructions to: Return to this plugin page after the synchronise is complete.

Anyway, I hope what I've written here will be useful and improve the process for future users...

Offline

 

#108 2021-07-25 12:50:11

pashdown
Member
2021-07-25
3

Re: FAQ? Migrating from gallery 2 to piwigo

In attempting to migrate from Gallery2, I am getting this error on some comments:

  'anonymous_id' doesn't have a default value

I have deleted some comments from my Gallery2 mysql to get past this, but there are some I would like to keep.  Is there a way I can massage my Gallery2 mysql database to give a value to anonymous_id?

Offline

 

#109 2021-07-25 17:16:54

windracer
Member
St. Pete, FL
2014-12-28
458

Re: FAQ? Migrating from gallery 2 to piwigo

pashdown wrote:

In attempting to migrate from Gallery2, I am getting this error on some comments:

  'anonymous_id' doesn't have a default value

I have deleted some comments from my Gallery2 mysql to get past this, but there are some I would like to keep.  Is there a way I can massage my Gallery2 mysql database to give a value to anonymous_id?

This is a thread from a Gallery 3 import, but maybe it will help?

https://piwigo.org/forum/viewtopic.php? … 77#p161677

Offline

 

#110 2021-07-25 18:20:32

pashdown
Member
2021-07-25
3

Re: FAQ? Migrating from gallery 2 to piwigo

windracer wrote:

pashdown wrote:

In attempting to migrate from Gallery2, I am getting this error on some comments:

  'anonymous_id' doesn't have a default value

I have deleted some comments from my Gallery2 mysql to get past this, but there are some I would like to keep.  Is there a way I can massage my Gallery2 mysql database to give a value to anonymous_id?

This is a thread from a Gallery 3 import, but maybe it will help?

https://piwigo.org/forum/viewtopic.php? … 77#p161677

Unfortunately, Gallery2 doesn't have the "server_remote_host" nor "server_http_host" columns anywhere.  I'm pouring over the code trying to figure out where it does fetch 'anonymous_id' from, but I can't find it in the Gallery2 section.  Maybe that's the problem?  There is a 'g_host' column that I can't see being used anywhere.

Offline

 

#111 2021-07-25 18:57:30

pashdown
Member
2021-07-25
3

Re: FAQ? Migrating from gallery 2 to piwigo

pashdown wrote:

Unfortunately, Gallery2 doesn't have the "server_remote_host" nor "server_http_host" columns anywhere.  I'm pouring over the code trying to figure out where it does fetch 'anonymous_id' from, but I can't find it in the Gallery2 section.  Maybe that's the problem?  There is a 'g_host' column that I can't see being used anywhere.

I fixed it by inserting anonymous_id into the inserts like this:

Code:

          $comment_inserts[] = array(
            'image_id' => $iid[ $row['id'] ],
            'date' => $row['date'],
            'anonymous_id' => '0.0.0.0',
            'author' => pwg_db_real_escape_string($row['author']),
            'content' => pwg_db_real_escape_string($comment),
            'validated' => 'true',
            );

In retrospect, it may be proper to do 'anonymous_id' =>  $row['host'] instead, but right now, I'm really not concerned about the IP address of 20+ year-old comments.  I just needed them imported.

Offline

 

Board footer

Powered by FluxBB

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