I’m planning a migration of an existing community (macscripter.net - Mac OS Automation discussions) hosted with FluxBB to Discourse. This article looks promising in terms of migrating the data. Its going to be a big job as I have over 30,000 users, and 120K posts but it seems doable.
However, I want to preserve all the incoming links. macscripter.net is a significant reference for the Apple automation community. We’ve got almost 20 years of posts with a lot of references to the site appearing on other sites and in mailing list archives which I don’t want to break.
I’m looking for a way to translating incoming FluxBB post links to corresponding Discourse posts? I don’t see any way to accomplish this with stock Discourse so I’m presuming I’ll need to create some sort of plugin that responds to FluxBB’s /viewtopic.php?id=##### links and redirects to the appropriate Discourse link. If anyone else has experience solving this kind of problem, I would love to hear how you approached it.
I have the same question, and I’m bit confused about the answer. I’m also looking to do a sizeable FluxBB import.
I see there’s actually a discourse feature called “Permalinks” ( How to make a redirect URL in a Discourse install? - #4 by cpradio ) so we’re saying that by creating those things, discourse could take a FluxBB style URL such as “/viewtopic.php?id=((old topic id))” and redirect to “/t/((new topic slug))/((new topic id))”. Maybe likewise for individual posts in a topic? Likewise for user profile URLs. (So we’ll need many permalinks). I see the database table for Permalinks.
That sounds like a neat solution, but the FluxBB importer isn’t creating any permalinks. I can’t see any code for that. In fact I can’t see any code in any of the import_scripts for doing that (No mention of the “Permalink” ActiveRecord model).
I’d be happy to work on modifying the fluxbb importer to do this, but is there an example in one of the other importers?
The only thing I do see in the code along these lines, is the “LookupContainer” getting initialised and storing all the old ids and their corresponding new ids. Can this be used for creating lots of Permalink objects?
Check out the vbulletin importer (but also answerhub, vanilla, mylittleforum, bbpress, drupal for some others–maybe you grepped with case sensitivity or something), which does it in the import_topics function (ignore the permalink file function). You’ll want code that adds the permalink and a permalink_normalization that maps the fluxbb URL into whatever permalink you created.
Gah! You’re right. My IDE search was playing tricks on me. In fact there’s loads of examples “Permalink” objects being created. So maybe I’ll look at adding this to the FluxBB import.
I’m curious to know how your big import went @alldritt . Well it looks like macscripter.net is still on FluxBB, so not very well? If you noticed that the fluxbb importer is not converting bbcode very well, I’ve been working on various fixes to that: Pull request in progress.
There’s an interesting (awkward) overlap between these discussions, because FluxBB supports bbcode of the form [post=123] to link to another post by id (referencing old post ids in the source FluxBB system). It’ll make it easier to deal with that if we’ve got a solution redirecting these ids.
I had a couple of runs at converting and gave up. In time, as I moved to an M1 Mac, I lost my Discourse testbed and never got around to recreating it. I hope to return to this project as soon as I have some time to spare. Dealing with redirection of existing links was a piece I was struggling with. I had not gotten around to verifying all the BBCode was translated correctly. I have 130K+ posts to convert which is daunting to verify.
Hopefully this will be helpful to you then. Yesterday I was doing some work to add create_permlinks functionality to the FluxBB importer.
At the moment this is sitting in my WIP PR. See “Add Permalink creation logic to FluxBB importer” commit at the end of this list. I hope to get all of that merged at some point, possibly in a different order (I’m currently waiting on someone to review this basic PR as a start point)
So this creates redirects for four different types of FluxBB urls.
I think these four cover everything people will want to preserve working links to. What d’you think?
Back on the topic of FluxBB’s special internal links
I wasn’t going to try to keep these as internal links within the new discourse. Lazy solution: They’ll link out to the old fluxbb forum URLs (as full URLs, so external links) which will, thanks to these Permalinks, then redirect the user back to right place in the new discourse.