Migrate a XenForo forum to Discourse

How can I import only themes from xenforo? And move them to a specific category in Disc

We can migrate themes from xenforo?! pretty sure that isn’t possible

1 Like

*topics
Sorry :sweat_smile:

If you look through my threads on here, Jay responds to one of my posts with a modification to the xenforo.rb script to do this

2 Likes

i have error on last step:

importing private messages...
Topic ID 0 not found, skipping post 14 from 0
        1 / 28302 (  0.0%)  [80733 items/min]  Topic ID 0 not found, skipping post 15 from 0
        2 / 28302 (  0.0%)  [115895 items/min]  Topic ID 0 not found, skipping post 17 from 0
        3 / 28302 (  0.0%)  [141468 items/min]  Topic ID 0 not found, skipping post 18 from 0
        4 / 28302 (  0.0%)  [160596 items/min]  Topic ID 0 not found, skipping post 22 from 0
        5 / 28302 (  0.0%)  [158134 items/min]  Topic ID 0 not found, skipping post 28 from 0
        6 / 28302 (  0.0%)  [167920 items/min]  Topic ID 0 not found, skipping post 29 from 0
        7 / 28302 (  0.0%)  [178637 items/min]  Topic ID 0 not found, skipping post 44 from 0
        8 / 28302 (  0.0%)  [188301 items/min]  Topic ID 0 not found, skipping post 45 from 0
        9 / 28302 (  0.0%)  [196423 items/min]  Topic ID 0 not found, skipping post 48 from 0
       10 / 28302 (  0.0%)  [202985 items/min]  Topic ID 0 not found, skipping post 50 from 0
       11 / 28302 (  0.0%)  [204726 items/min]  Topic ID 0 not found, skipping post 51 from 0
       12 / 28302 (  0.0%)  [209394 items/min]  Topic ID 0 not found, skipping post 52 from 0
       13 / 28302 (  0.0%)  [213452 items/min]  Topic ID 0 not found, skipping post 55 from 0
       14 / 28302 (  0.0%)  [217192 items/min]  /var/www/discourse/vendor/bundle/ruby/3.2.0/gems/php_serialize-1.2/lib/php_serialize.rb:315:in `do_unserialize': Unable to unserialize type '{' (TypeError)

				raise TypeError, "Unable to unserialize type '#{type}'"
				      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
	from /var/www/discourse/vendor/bundle/ruby/3.2.0/gems/php_serialize-1.2/lib/php_serialize.rb:214:in `unserialize'
	from script/import_scripts/xenforo.rb:349:in `block (2 levels) in import_private_messages'
	from /var/www/discourse/script/import_scripts/base.rb:548:in `block in create_posts'
	from /var/www/discourse/vendor/bundle/ruby/3.2.0/gems/rack-mini-profiler-3.3.1/lib/patches/db/mysql2/alias_method.rb:8:in `each'
	from /var/www/discourse/vendor/bundle/ruby/3.2.0/gems/rack-mini-profiler-3.3.1/lib/patches/db/mysql2/alias_method.rb:8:in `each'
	from /var/www/discourse/script/import_scripts/base.rb:547:in `create_posts'
	from script/import_scripts/xenforo.rb:325:in `block in import_private_messages'
	from /var/www/discourse/script/import_scripts/base.rb:948:in `block in batches'
	from /var/www/discourse/script/import_scripts/base.rb:947:in `loop'
	from /var/www/discourse/script/import_scripts/base.rb:947:in `batches'
	from script/import_scripts/xenforo.rb:314:in `import_private_messages'
	from script/import_scripts/xenforo.rb:45:in `execute'
	from /var/www/discourse/script/import_scripts/base.rb:47:in `perform'
	from script/import_scripts/xenforo.rb:569:in `<main>'

Can someone help me?

I would put a puts there where it’s failing or add a rescue to the thing that’s calling php serialize.

But if all of those pms are failing, then maybe the pm importer is just broken for your version of Xenforo. So you might need to look at the query it’s doing.

That’s about all I can suggest without diving into your database and the code.

2 Likes