Sorry to reply again. I’m struggling to figure out why permalinks aren’t being created.
To recap:
I’m using the default ugly URLs in SMF2 on the toplevel root domain. Discourse is installed on a subdomain of that root domain. I’ve used the smf2.rb importer in the latest Discourse repo to convert SMF2 to Discourse (following your guide), but there are no permalinks in Discourse after import finished.
You’d change that permalink (or maybe the couple other ones?) to whatever ugly ones look like? Though, that looks pretty ugly to me. You might also adjust the permalink_normalizations at the top of the file.
I’m confused because the version I linked seems to be the most recent “official” version… but you’re the second person who referenced a different version. What am I missing? Where can I get your version?
Aha! Sorry. It looks like I clicked the smf1 script. So look at smf1.rb1 that’s right there with the smf2.rb script you’re looking at.
You can either look at the smf1 script or use make_prettyurl_permalinks as a model to create a make_uglyurl_permalinks. But that is reading from the pretty URL table, so it might be easier to use smf1.rb as a model, but I’d have to look at the database to tell for sure. No. That won’t help much either unless you modify the create_xxx functions.
Sorry. I don’t see a fix that can be explained here.
OK after MANY hours back and forth trying to get this to work I have identified the issue and am posting it here for any others that might get stuck like I did.
The MySQL docker container is version 8, this means for some reason the mariadb library that the MySQL template draws in doesn’t work.
I did not include the MySQL template file in the import docker container config file, this was the first change.
I built the import container, entered into it with ./launcher enter import
This has an interactive prompt and you can select the defaults (MySQL 8 with tools)
Then I installed the normal MySQL 8 library and continued the build:
apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y libmysqlclient-dev
su discourse -c 'bundle config unset deployment'
su discourse -c 'bundle install --no-deployment --path vendor/bundle --jobs 4 --without test development'
Once this was all done the rest was the same, the import is now running.
The Discourse devs may want to adjust the import scripts to account for this, at least it’s now on the forums for others to see if they get stuck like I did.
I’ve manually transferred the attachments directory from smf2 to Discourse prior to importing, then ran the importer once, but uploads aren’t appearing in posts in Discourse. Any ideas why?
I’ve already run the importer once without S3 enabled, but I want to use S3. What should I do?
So I thought my import issues were possibly related to S3 issues, but turns out S3 seems to be working just fine. The issue I’m having is that after running the import script (with S3 enabled) and rebuilding the import container, it seems all topics in Discourse are lacking the uploads that are attachments in smf2 topics. In other words, there’s no visual cue that there is even an upload in a Discourse topic, which is clearly seen as an attachment in its smf2 topic equivalent. It’s the same result when I import with S3 disabled. A bit out of ideas here. Any thoughts?
It may be that the images are attached to the post, so the import script knows to import them, but that they are not referenced in the post so that they don’t appear. You need to modify the post text to include a link to the images. I’ve seen that, I think with a different forum.