Legacy forum content migrated


  • administrators

    Alright, it took a few months but I've finally tackled the task of migrating the discussions from the "old" forums to this beauty 🙂

    As you might (or might not) know; when I've first set up forums.vigem.org I wanted to experiment with something bleeding-edge and good looking and decided to settle on Flarum, a modern forum solution based on PHP and MySQL. A classic combo, yet nice design and good balance between basic features and extensions like authentication via GitHub account etc.

    That was around a year ago. Flarum was (and still is) in a very early state (which was clearly documented and emphasized) and I was fine with that. But after many months of no noteworthy updates I got worried and crafted a backup plan.

    I have to admit, I like Discord very much. In many situations instant chat is far more efficient than the slow-paced communication happening via mail. Especially when it's just questions about the garba... I MEAN products I've thrown into the world 😉 But discussions on Discord are inherently volatile. Some topics are worth getting archived and searchable and why reinvent the wheel when a good old "bulletin board" provides exactly that.

    So by shifting the forums environment up in priority I wanted to settle on something - yet again - more future-proof. A product a few more years on the market, an active community and still up-to-date technology and features. So after yet another session of evaluating what's out there I went for NodeBB. Hopefully, this was the right choice 😆 So far I'm pretty impressed and satisfied, so let's just leave it at that 😉

    But... what about the old content? Well, after a year of public exposure it was still small but the content was in my opinion relevant enough to at least deserve proper archiving. By the time of my evaluation, no export mechanism or REST API was available in Flarum and that's not surprising; why would they focus on that when there's more important stuff to work on? Thankfully a NodeBB plugin exists offering a writable REST API which I can use to feed content automated into the new installation. Sweet! So I went for the challenge of writing my own migration tool which would directly read from the Flarum MySQL database instance to work around the lack of an higher level API.

    Meet Candler

    While being a throw-away tool I've decided to publish the sources anyway. Maybe some other poor soul has future use for it 🙂 The Candler tool is a C# console application reading the Flarum discussions from MySQL with the help of linq2db, converting the posts into Markdown and injecting them into a NodeBB category. More details in the project README. The conversion is fairly flat, let me mirror the limitations it has:

    • Users are not migrated, instead a header (Originally posted by {username}) is inserted into every post body on transformation to keep full-text-search working
    • Non-text assets (embedded images, files etc.) are note migrated
    • Link URLs are not validated or rewritten
    • Flarum tags are converted into NodeBB categories under a defined parent category
    • Posts are converted in original creation order but are not dated back to original creation date
    • Hidden (deleted) posts get skipped
    • Post body transformation relies entirely on the magic within Reverse Markdown and doesn't cover all possible formatting quirks that might occur. The quality of the conversion was sufficient for my needs though 😇

    A quick-and-dirty approach, sure! But I didn't want to pollute the new installation with legacy user account objects and not put too much time into this to be perfectly honest. I still have a backup of the original database, so if there's something vital missing, I could still provide later on.

    Meet the result

    Last but not least: here's the migrated content 😎

    Cheers