Issues while migrating from Kunena

Hmmm, on the other hand the id field is a 1 up serial nothing to do with the post/parent/thread/category - it seems. Here’s the first few lines of the MySQL output using the query in the script:

id 	thread 	parent 	catid 	userid 	subject 	time 	message 	
2 	2 	0 	2 	717 	The new mess 	1350613779 	
3 	3 	0 	3 	717 	The Crew Room 	1350937488 
4 	2 	2 	2 	718 	The new mess 	1350938408 	
5 	4 	0 	2 	717 	Moderator Help! 	1350939426 	
6 	5 	0 	2 	717 	Back End Login 	1350939575 	
7 	6 	0 	2 	717 	Article creators 	1350941108
8 	6 	7 	2 	721 	Article creators 	1350942433 	
9 	6 	8 	2 	717 	Article creators 	1350942649
10 	6 	9 	2 	720 	Article creators 	1350942806 
12 	6 	7 	2 	717 	Article creators 	1350943114 
13 	6 	12 	2 	721 	Article creators 	1350943209
14 	4 	5 	2 	721 	Moderator Help! 	1350943410
15 	6 	12 	2 	717 	Article creators 	1350943428
16 	6 	15 	2 	721 	Article creators 	1350943550
17 	6 	16 	2 	717 	Article creators 	1350943618
18 	4 	14 	2 	717 	Moderator Help! 	1350943656
19 	7 	0 	2 	717 	Avatars 	1350944230 
20 	6 	7 	2 	720 	Article creators 	1350944408 
21 	2 	4 	2 	723 	The new mess 	1350979104 
22 	2 	21 	2 	717 	The new mess 	1350979893 
23 	2 	22 	2 	717 	The new mess 	1351001556 
24 	7 	19 	2 	717 	Avatars 	1351001703 	
25 	2 	23 	2 	717 	The new mess 	1351002874 
26 	8 	0 	16 	717 	Acceptable Useage Policy 	1351006949 
27 	9 	0 	17 	717 	ACC BETA 	1351114404 	

the first 2 threads get imported - sort of! but the rest all fail hmmm

Just by looking at it I’d say change line 123 to the following:

if m['parent'] == 0

I’m not sure if thread is even needed. Maybe someone who knows more about kunena can chime in…

1 Like

Wow!

It’s importing! Let’s see what the results are! … :smile:

Well,

most of the posts were imported using @gerhard 's suggestion about line 123 in kunena.rb

I’m guessing that some posts didn’t get created because of the content of the post - am about to investigate

Also the script only got to 65.7% of the import - no reason given but could be an overload (there’s 23000+ posts to import) and it’s only a little test DO droplet.

On the plus side the script appears to work now. Where / who do I see about updating the kunena.rb file, or indeed adding another file for kunena v3.0.6 which is the version i’ve been working with?

cheers and thanks for everyone’s help

Dave

@neil Can you please take a look at this? For which version did you write the original importer?

I’ll find out what version of Kunena that export was from. I have no idea…

There are two options for supporting multiple versions of Kunena:

  1. Instead of updating the existing kunena.rb, submit a new file called something like kunena3.rb.
  2. If there are only a few changes to support 3.0, then put a version constant at the top, like KUNENA_VERSION = 3.0 and the script can check that when it needs to:
if KUNENA_VERSION == 3.0
  # do stuff for 3.0
else
  # do stuff for whatever version Neil worked on
end
1 Like

Thanks @neil I reckon a script for kunena 3 might be the way forward. How do I go about submitting the file?

cheers

1 Like

Ok that sounds good. Submit it in a pull request. :smile:

Hi guys,

still in the process of sorting out the update for the converter - they updated kunena so I still need to check that everything works.

As a side - how would one then replace the kunena forum with Discourse? In other words, in it’s simplest form, iframe discourse into a joomla frame work? - not worried about users as the import process brings them over and I have ho need for users to log into joomla (not yet anyway).

Your help please :smile:

Hi again guys,

here’s the next hurdle to migrating - Private Messages.

Is there a (easy) way of migrating form Uddeim to Discourse?

Cheers

Hi @neil @gerhard @Benninger ,

I submitted a pull request and had it merged yesterday for kunena3.rb I finally got it to work for kunena 3+ installs!

It even works running against an exiting import that updates the new from the old.

Hope this helps others out as well.

Cheers

Dave

6 Likes

Hi guys,

I’m struggling with getting this import script to run - if anyone out there is willing to give me a hand it would be greatly appreciated. I have 2 sites, one small and one fairly big that I would love to migrate but I’ve been hitting a brick wall with this the last few weeks.

TIA!

/Kohhal

@maia_internet Thank you. This worked amazing!

@Kohhal: What is the issue? It would be more useful for you to articulate what the error is rather than leave it for us to guess.

tarek : )

I have distilled the instructions into a thread, which you can find here:

I hope it helps!

2 Likes

Generally the migration to Kunena has been excellent, however I have run into a another problem. I can’t figure out how to properly convert some of the posts, which appear like this:

[FONT=Arial][COLOR=#000000]I have just finished 
the first draft abstract – deadline is Dec 4 at 5 pm for SAEM.  I would 
appreciate any and all feedback re below.  In particular the results 
section will need to be fleshed out given our ongoing data analysis, but
 everything else is up for comment also.[/COLOR][/FONT]

It’s obviously some kind of markup language that doesn’t seem to apply to all posts. What is it even called so that I can figure out how to translate it? I vaguely recall “BBCode”? Is that what this is? Any thoughts re: how to convert it?

Update: Yes, it’s BBCode. Just trying to figure out how to do the conversion now

The forum I have is complex in that it represents at least 3 distinct eras from as far back as 2005. As such, I’ve just been hand-fixing the BB code with some regex, and will leave it as such. Also, some of the very old posts don’t have the owner properly attached, which is a real nuisance. I’ve also just been handfixing them as I run across them…

1 Like

Thanks for this. I have finally managed to get the Kunena import script working after a lot of trial and error (not a ruby developer).

I now have a workable database in a Vagrant machine in the discourse_development db. I’ve exported it and imported it into a production discourse setup but now I’m seeing 500 Internal Server Error on the production site.

Are the databases exactly the same or is there something special I need to do when importing a development database into production?

I assume this has been sorted out by now, but just FYI, the conversion process isn’t a direct DB copy. Instead, you have to do a backup / restore as per these instructions.

1 Like