Thanks a lot for the importer script! I’m currently importing phpbb 3.0.9 and I have following error:
Traceback (most recent call last):
21: from script/import_scripts/phpbb3.rb:11:in `<main>'
20: from script/import_scripts/phpbb3.rb:12:in `<module:ImportScripts>'
19: from script/import_scripts/phpbb3.rb:31:in `<module:PhpBB3>'
18: from /var/www/discourse/script/import_scripts/phpbb3/importer.rb:20:in `perform'
17: from /var/www/discourse/script/import_scripts/base.rb:47:in `perform'
16: from /var/www/discourse/script/import_scripts/phpbb3/importer.rb:31:in `execute'
15: from /var/www/discourse/script/import_scripts/phpbb3/importer.rb:112:in `import_posts'
14: from /var/www/discourse/script/import_scripts/phpbb3/importer.rb:168:in `batches'
13: from /var/www/discourse/script/import_scripts/base.rb:883:in `batches'
12: from /var/www/discourse/script/import_scripts/base.rb:883:in `loop'
11: from /var/www/discourse/script/import_scripts/base.rb:884:in `block in batches'
10: from /var/www/discourse/script/import_scripts/phpbb3/importer.rb:118:in `block in import_posts'
9: from /var/www/discourse/script/import_scripts/base.rb:501:in `create_posts'
8: from /var/www/discourse/vendor/bundle/ruby/2.5.0/gems/rack-mini-profiler-1.0.1/lib/patches/db/mysql2.rb:8:in `each'
7: from /var/www/discourse/vendor/bundle/ruby/2.5.0/gems/rack-mini-profiler-1.0.1/lib/patches/db/mysql2.rb:8:in `each'
6: from /var/www/discourse/script/import_scripts/base.rb:502:in `block in create_posts'
5: from /var/www/discourse/script/import_scripts/phpbb3/importer.rb:119:in `block (2 levels) in import_posts'
4: from /var/www/discourse/script/import_scripts/phpbb3/importers/post_importer.rb:38:in `map_post'
3: from /var/www/discourse/script/import_scripts/phpbb3/importers/post_importer.rb:64:in `map_first_post'
2: from /var/www/discourse/script/import_scripts/phpbb3/importers/post_importer.rb:89:in `add_poll'
1: from /var/www/discourse/script/import_scripts/phpbb3/importers/poll_importer.rb:28:in `map_poll'
/var/www/discourse/script/import_scripts/phpbb3/importers/poll_importer.rb:103:in `add_poll_to_custom_fields': uninitialized constant DiscoursePoll::POLLS_CUSTOM_FIELD (NameError)
Did you mean? PostCustomField
Do you have any idea why those are not initialised. It seems like there ate not such tables on a discourse DB.
Importing of polls is currently broken and I didn’t get around to fixing it yet.
You could run the import with the stable branch of Discourse. Or an earlier beta – I think up to beta4 or 5 should work. You can upgrade after the import. I’m sorry for the inconvenience.
settings.yml says it will add permalinks for /viewtopic.php?f=6&t=43 URLs, but it won’t actually do so, it will only make permalinks for /viewtopic.php?t=43 URLs.
I took a look at the code, and it looks like it wouldn’t be too hard to do this. I’d need to patch to the following in post_importer.rb (adding the forum_id), and then make a second permalink.
Does that sound about right? Would you accept a PR for this? If I work on this, is there a way to just run the permalink importer so I don’t need import my full forum from scratch?
I’ve also noticed that it doesn’t use the site prefix settings, so if you’re changing paths, like from a subdirectory to a subdomain, the permalinks will be useless. What if there was a setting for a permalink prefix to add to the front?
The import script adds permalink normalizations in order to deal with all sorts of irrelevant query parameters. Otherwise you’d need to add a lot of permalinks for all the possible variations of the query string. I don’t think there’s a case where it doesn’t work.
is it possible to also import the Thanks/Likes made with the phpBB extension “Thanks for Posts” into Discourse? Here’s a link to the extension: phpBB • [CDB] Thanks for posts
I just checked the thanks table in the database. It looks pretty simple for me. Post ID, poster ID, user ID, topic ID, forum ID and a timestamp. No idea why there has be a poster ID (the user which received the thank) and also topic and forum ID as I would say post, user (who gave the thank) and timestamp should be enough.
I’m asking because this extension is heavily used with over 2000 thanks in the forum I want to migrate to Discourse. Also I would say it is a very common extension used by many phpBB forum admins.
Mods are currently not supported, but you can modify the import script yourself (pull request welcome), post in marketplace or sign up at for a plan at discourse.org and let us worry about it.
I recommend going with discourse.org hosting if it fits your budget. I can make the modifications if you have a smaller budget. My contact info is in my profile.
then running bundle exec rails server --binding=0.0.0.0 worked like a charm.
Now I have a fresh discourse server with posts that I actually care about which makes using discourse server a lot more meaningful to me.
Need to use my Discourse server in place of my phpBB3.2 to find out things that I want to improve. But as for now, I didn’t run into major problems while migrating. I don’t use any files or avatars, so I can’t comment on them.
Someone has pointed out to me that there’s a security leak with the full name fields and this migration script:
The public full name field in the profile is apparently automatically filled in based on the user’s email address? My email address starts with juhana.if and the full name was shown as Juhana If. This might be a problem to someone who signed up here with a pseudonym and didn’t want their real name revealed, and didn’t expect that part of their email address was to be made public. Now you can browse the user list and see a lot of real names there. Not only that, but you can probably guess many email addresses by just adding @gmail.com to the end.
This seems like quite a serious issue IMO.
I’m expecting to do the real migration for my forum this week. Any ideas on how to disable this?
Also a small thing that could be added to your todo list at the top: importing phpBB foes as muted users.
Hmm, I’m not opposed to them in general, just these auto imported ones. But thanks, that will give us a stopgap solution. I should be able to run a query to reset them.
Edit: wait, isn’t this what the username_as_name setting is meant to handle? settings.yml says that “When false: the name of each imported user will be blank unless the username was changed during import” but that’s not true.
Is importing polls still an issue with stable/tests-passed? Anyone tried a migration recently? It’s easy enough to start with 2.1.x and then upgrade to 2.2.x if so.
I’ve raised some issues here, but I have to say that on the whole the migration has been very smooth. Thank you @gerhard and everyone else who’s worked on it!
It’s a simple but effective forum using PHPBB with just one forum theme and no plugin. Really the basics.
I would like to explore the move to Discourse. Is there a way to trial this to see if it worth? I’ve seen some 20 euros/month hosting that could be more relevant for me (small forum) than a 100 USD / month.
I’ve got the discourse up and running but now I’m looking to migrate the PHPBB 3.2 to it. Unfortunately I’m not able to cover that much of money. All I do in my community is with my pocket money and I don’t get any money out of that. I spent all my time in helping people around me and will not able to afford “expertise” for that.