phpBB3フォーラムをDiscourseへ移行する

I can at least say that it not only happens for those cases where older posts link to newer ones.

I got one example where I first found the issue.

Original Post ID: 842948 links to Page 22 of a thread that already existed and at least the start post (&start=220) has an ID lower than the linking post (842880)

After import this original post (which was posted only days before the dump was created) links to a 7 year old thread where the first post has an original ID of 1353.

I can’t seem to find any hints on why this happens, any similarities in numbers in any way… The original link was just a plain posted URL which was auto linked by phpBB. Those links in general don’t cause any issues - they work in several other places.

Generally I don’t expect the import to go well immediately. I’m really happy to how it went so far but I assume this issue might be one of the hardest to fix, especially because I don’t have any clue of setting up a dev/debug environment with Discourse yet. Might need to dig into that soon.

「いいね!」 3

Hi,
From what I remember, the phpbb importer was by default filling the Discourse user full name by guessing from the user email address. Am I right and is it still the case? I can’t find anything about this in the importer files…

This is something I wouldn’t want to happen in the next forum I may import.

Also, another question.

On the current phpbb forum, there are custom user fields (like users facebook or instagram urls). I would like to import this in Discourse custom fields. I guess I’ll do something like first installing and configuring Discourse by adding these custom user field, then importing the phpbb data from my custom import script?

「いいね!」 1

That’s not happening anymore.

That sounds like a good plan.

「いいね!」 6

Is there a reliable way to estimate the monthly volume of emails that Discourse will send to users after a migration from phpbb? New user registrations, mentions and replies, weekly digests and so on… Phpbb sends very few emails by default and I think we’ll have to change the current email provider.
I don’t currently have much stats from the actual phpbb. It exists since 2013, with 200000 messages and 5500 members. New members register everyday.

「いいね!」 1

How many posts per day?

「いいね!」 1

I dont know yet. I have currently nothing but the public stats. Maybe 20.

「いいね!」 1

With only 20 posts per day I think you’d probably be looking at 3000 emails a month, at most, well within the free Mailgun plan.

However seeing as you’re migrating with lots of users I’d recommend you turn off the digest emails for everyone who hasn’t been to your forum within the last month or two (they can always turn it on themselves if they want). You can do that with a query in the Rails console, but it’s been a year since I did it for mine, so I don’t remember the exact code sorry.

That should actually be something the import script could do for you IMO, ideally with a setting for the time since last visit to enable digest emails.

「いいね!」 4

I disagree. That’s not something an import script should do, but there’s a site setting for this: suppress digest email after days

「いいね!」 4

Indeed :slight_smile: After my first phpbb import on my current forum, I had to decrease the default value; my email provider automatically blocked the used address because of all the digest emails sent. It was flagged as spam.

「いいね!」 1

It’s not quite the same thing. There’s a difference IMO between sending digest emails to someone for X months since their last visit when they signed up for it - just because they don’t visit the forum doesn’t mean they’re not reading the digest emails - and sending digest emails to a user who never signed up for them because they registered in the previous forum, which may not even be legal in some jurisdictions! You could simply turn off digests for every migrated user, and they can turn then on for themselves, or you could do as I did and turn them off for everyone except those who visited within the last month and who therefore would have seen the “we’re going to migrate the forum soon” announcement. I think that’s a fair middle ground.

It’s also practical - our phpBB forum had gained thousands of spammer accounts within the last year and sending the digest to them four times a month would have used all our free mailgun allowance and then started costing a lot. Reducing “clean up inactive users after days” eventually cleaned them up.

「いいね!」 5

ここか別のトピックに該当するかわかりませんが、phpBB 3 からの移行に関する話題なので投稿します。

私は 1 つのデータベースを使って Discourse への移行に成功しました。しかし、3 つの異なる言語、3 つの異なる phpBB インストールからなる 3 つの独立したコミュニティがあります。理想的には、これらをすべて 1 つの大きな Discourse フォーラムに統合したいと考えています。

私の質問は、これを行うにはどうすればよいか、またインポートスクリプト、phpBB 3 のデータベース、あるいは他の場所で何を変更する必要があるかということです。
いくつかのユーザーは複数のフォーラムにアカウントを持っていますが(中には 3 つすべてにアカウントを持つユーザーもいるかもしれません)、シングルサインオンがないため、各フォーラムでは同じユーザー名で異なるアカウントが作成されています。これらはすべて異なるインストールと異なるデータベースです。
これが実現可能なら素晴らしいのですが!

ご支援をありがとうございます!

「いいね!」 1

そのままでは動作しません。インポートスクリプトは元の ID を Discourse データベースに保存するため、同じ ID のレコードが存在すると追加のフォーラムからのデータをインポートしないからです。ただし、これを解決する方法が 2 つ考えられます。

  1. 難易度高:インポートスクリプトを複数の箇所で編集し、投稿、トピック、カテゴリ、ユーザーに保存される import_id カスタムフィールドに各フォーラムのプレフィックスを追加する必要があります。

  2. 簡単ですが、増分インポートの機能が失われます:各インポート後にカスタムフィールドを削除します。

    TopicCustomField.where(name: 'import_id').delete_all
    PostCustomField.where(name: 'import_id').delete_all
    CategoryCustomField.where(name: 'import_id').delete_all
    UserCustomField.where(name: 'import_id').delete_all
    

解決策 2 は未検証ですが、理論的には動作するはずです。試す前に必ずバックアップを作成してください。

「いいね!」 7

新年前の最初のテストの後、移行プロジェクトが再開されました。現在、まだ最大の課題の一つはリンクの書き換え失敗であり、それをどのように最も適切に処理するかを検討しています。

@gerhard 私のコーディング知識は非常に基礎的であり、Rails や Discourse の構造の詳細については全く知識がありません。そのため、以下の質問についてご容赦ください:インポート処理がリンクから指定された ID のインポート済み投稿を見つけられない場合、それを誤ったリンクに置換する代わりに、ユーザーや管理者に通知するテキストを追加し、インポート後に問題のあるリンクを検出可能にするような対応は可能でしょうか?

現在の動作における私の主な懸念は、これらのリンクが正常に置換されたように見えるだけで、インポート後にそれらを見つけ手動で修正する方法がないことです。

ご支援いただける場合は、大変感謝いたします。

「いいね!」 1

一つの方法は、スクリプトを書き換えて、すべての投稿がインポートされるまでリンクの置換を行わないようにすることです。サポートが必要で予算がある場合は、私に連絡するか、Marketplace に投稿してください。

「いいね!」 4

残念ながら、このプロジェクトは予算が限られており、おそらくこの問題に予算を割くほど重要ではないと思いますが、あなたが対応可能であることは大変心強く思います。

もう一つ質問があります:インポート時に BB コードの扱いが異なることに気づきました。例えば、[size] はテキストとして残りますが、[color] は完全に削除されているようです。色を再利用したいと思い、Discourse のプラグインがあることに気づいたのですが、インポート時に削除されているようです。最初の投稿では BB コードがインポートできると書かれていましたが、どの BB コードがインポートされるかを制御する設定が見つかりませんでした。

可能であれば、size タグを削除し、color タグは残したいと考えています。この処理について何か見落としていることはありますか?また、どのように変更できるでしょうか?

「いいね!」 1

phpbb フォーラムで削除(prune)されたトピックが、消えたと思っていたのに、なぜか Discourse に移行されていることに気づきました。

どうしてそのようなことが起こるのでしょうか?

「いいね!」 1

これを行おうとしているのですが、手順で迷っています。ここで言及されている設定ファイルとはどのファイルのことでしょうか?また、これはインポート前に行うのでしょうか、それとも後でしょうか?
あらかじめありがとうございます!

編集:つまり、管理CP(コントロールパネル)内の絵文字設定ファイルを指しているのでしょうか?テキストファイルのインポートなどでこれを行う方法はありますか?カスタムスマイリーが約100種類あるので、そのマッピングをDiscourseにコピーしたいと考えています。可能でしょうか?(phpBBのsmilies.pakファイルを何らかの方法でDiscourseの設定にコピーすることはできますか?)

「いいね!」 1

インポーターの設定ファイルを確認しましたよね?:wink:

「いいね!」 3

phpBBは通常の削除トピックとは異なり、削除(pruned)されたトピックを別様に扱っているようです。その場合、現在ではサポートされていません。phpBBが削除(pruned)されたトピックをどのように削除としてマークしているかを確認し、インポートスクリプトを修正する必要があります。

「いいね!」 3

あー、そうそう!確かに、最初のコンバージョンからずいぶん経ってましたね。すっかり忘れていました、ありがとう!

削除されたトピックについては、確かにそうだったと思います。私のフォーラムでは大きな問題ではありませんが、驚きましたし、他の人にもこのことが起こりうるかもしれないという事前情報として役立つかもしれません。

「いいね!」 1