vBulletin import_script bug in importing children categories

Dear All,

Well, first of all, a BIG SHOUT OUT OF THANK YOU to Discourse. Discourse is a work of art and very impressive. After over a decade with vBulletin, we could not find any forum software to port to (it was all just ‘same ole, same ole’… blah blah), until Discourse. THANK YOU

Currently, I am in test bed mode, importing from vB 3.8.X to the latest version of Discourse in a docker container, both firsts for me. In fact, before this week, I never thought I would write a single line of Ruby but Discourse is so good, it’s worth it.

The import script vbulletin.rb is chugging along now for a day or so; and for the most part, it is working fine. In fact, it is extremely impressive. A few times it tossed an error, but when I restarted the script, the error went away.

I did find a bug in importing children categories. (that will not go away on restart) and here it is:

Traceback (most recent call last):

5: from script/import_scripts/vbulletin.rb:942:in `<main>'

4: from /var/www/discourse/script/import_scripts/base.rb:47:in `perform'

3: from script/import_scripts/vbulletin.rb:84:in `execute'

2: from script/import_scripts/vbulletin.rb:287:in `import_categories'

1: from script/import_scripts/vbulletin.rb:287:in `each'

script/import_scripts/vbulletin.rb:289:in `block in import_categories': undefined method `[]' for nil:NilClass (NoMethodError)

root@localhost-app:/var/www/discourse# su discourse -c 'bundle exec ruby script/import_scripts/vbulletin.rb'

My plan to address this is lame. I was going to redump the vB database and make all child forums parents and then do the entire migration again; but then I thought maybe I should be more social and post his as a bug report.

Any suggestions on a better way to fix this other than my lame noob idea above?

If not, I plan to just dump again, make adjustments in the DB manually, and migrate again, which I am sure is a lame noob way to get this fixed.


Maybe consider updating to at least vB 4 first… the importer is mainly targeted to 4.x.

How deep are your categories nested? If you only have one or two levels then just comment out the flattening code in lines 287-291.


No. I will. not do that (upgrade to vB4)

I already commented out the offending lines yesterday.

My question is basically fixing this for vB 3.8 otherwise, I’ll just fix it myself. I reported, in this post, a ‘bug’ about code and if I cannot get a bug fix in code reply, I’ll just code the fix myself.

That is why I posted the bug here :). It is a bug report about code. The code has a bug and so I reported it…

Hmmm. I was attempting to be sociable and post the bug here and hopefully, get suggestions from the leaders (code) that work for me in my case (not the vB4 case); and sorry again, but am not going to upgrade to vB4 under any condition. Sorry to be so direct and for not following thatidea. I will mod the migration script as necessary and mod our DB as required… So far, I’ll already added code for custom code tags, etc.


As one of the contributors on the vbulletin importer, the author of the VB 5 importer and someone who did over 50 vB to Discourse conversions, I was just sharing the information that the importer is mainly tested on vB 4, not on 3.8 which is EOL for over 7.5 years now. I was not trying to “impress” you…

Anyway. I wonder if this is a bug in the importer, a vB 3.x related issue, or a broken database. I suspect the latter options are more likely. You could modify the code to select a default category in case the detect function does not return a result, but (at least) on vB 4 this would indicate a dangling category without a proper parent, i.e. a broken db.


There nothing broken in our DB and it may or may not be a vB3.8.X issue. But of course it is related to vB3.8.X because this is a vB3.8.X upgrade, LOL

On the other hand, I have read many posts on the Internet in other forums with a lot of people having issues when they migrate to Discourse, even from vB4. (this is normal) So, of course, I’m not the only person on the planet reporting migration bugs. No one likes migration. It’s boring for everyone. But I am OK with it, because I like Discourse. The guys who wrote it are artists! They are impressive.

Like I said, the “lame approach” which will work for sure is to simply dump our DB again, change all child forums we want to keep to be parent forums (manually) and do the migration again. I don’t want a ‘default’ topic for important child forums, and all of our main forums are children, not parents.

@michael if you don’t have any experience or interest in insuring this script works with the legacy releases of vB3.8.X, that is perfectly understandable. But on the other hand, I also have zillions of years coding, porting, migrating, building, fixing bugs, and I posted a bug report here at Meta Discourse related to this code. I love vB3.8 and still think, today, it is was a nicer forum, than vB4 and vB5. That is why I never upgraded to vB5 or vB5. We do not like vB4/5. :slight_smile:

If this is going to turn into a “well, it’s not vB4 and not vB5” discussion, then I am better off not to post any migration bug here (any more) and become more active after the migration is done.


I will keep a running accounting here and will drop off this discussion for now and just get it done:

No, it’s not. I was just trying to help you out and figure out the migration path with the least effort for you. Sorry if I offended you with my honest answer. Apparently I struck a nerve. Didn’t mean to.

Good luck with the migration! Maybe you can make a pull request with your improvements when you’re done.

1 Like

No worries at all @michaeld

Thank you very much for authoring the vbulletin.rb migration script.

I do realize you were trying to be helpful, and yes, your “migrate to vB4 suggestion” did rub me the wrong way; but no hard feeling at all. Sometimes I am easy to “rub the wrong way”, especially when reporting a bug and then get a reply which is not helpful (to me, in my situation / case).

In fact, if this port works out (still porting), I will owe you (and all the co-authors) a big debt of gratitude for the core vbulletin.rb script!

Discourse is truly AWESOME!!

Thank you again for the migration script. we would not have embarked on this laborious process without it, for sure!

Thank you again!

PS: As I mentioned, my plan for this “fix” is to simply dump the db, change the important child forums to parents, and “play it again, sam”… :slight_smile:

For clarity: I did not write the entire vbulletin.rb, I just contributed to it. I did make the vbulletin5 specific one.

1 Like

Either way, THANK YOU.

Both contributions are solid and a gift to the community of forums.

I’ll post any vB3.8.X migration updates “back over there” where I am keeping a running chronicle of events as the unfold.


1 Like

The only “cautionary” comment I have so far is that of the two people on the “discourse side of the house” I have interacted with so far, both “had their hands out” looking to make money off this migration. One guy was a hired gun “migration expert” who wanted money to help me and the other person was in the discourse forums, the other was a discourse server provider.

This makes me pretty sad. I was trying to help you without any commercial interest.


yeah that’s not really fair @neounix

@michaeld is quite active in the Discourse community and they give back a ton of stuff to everyone in the open source style. Which is particularly valuable since they (DiscourseHosting) host a lot of Discourse sites at very reasonable rates, and have so much experience with real world Discourse hosting. :revolving_hearts:


Hi Jeff,

Recently, I built a number of Node-RED solutions and joined the Node-RED forum (which is a discourse site).

In that forum, everyone is jumping all over each other to help everyone. From noobs to expert, everyone is vibrantly helping others. In fact, it sometimes seems a bit “testosterone driven” where many of the experienced folks are competing to be the “best helpers” and “first to answer”. It’s interesting. I’ve seen this in online communities before, including ours, over the past decade (but that is another story for another day).

As someone who has been in the space for a long time, and I am sure you agree, every online community has its strengths and weaknesses. When new people come into the community, they provide a valuable perspective because they are not a part of the established social hierarchy. I think everyone who is experienced in online communities would agree with that.

Of course, I greatly appreciate @michaeld contributions, and the vbulletin.rb script has been a very helpful and much appreciated starting point for this legacy migration to the “work-of-art” you created, Discourse. Discourse is truly GREAT. I have been waiting for something this GREAT for years and so we were stuck, sadly, with vB3 and I’m not so great of a coder to build something like Discourse myself.

So yet, I do plead guilty (and accept any punishment) to being put off and feeling unwelcome when I submitted a bug report during a migration test and then getting what seemed to me to be the cold shoulder and even more “put off” when my bug report was moved from a ‘bug’ to ‘support’, when clearly there are bugs in the vbulletin.rb script. The suggestion to migrate a perfectly good vB3 forum to a horrible vB4 forum to make this script work better is a non-starter (and put me off, honestly); and so far, no one has taken any of bug reports seriously nor shown any interest in fixing them; so I think not submitting bug reports related to a vB3 migration is a good idea, isn’t that right?

So, it’s not a problem. For example, the current vbulletin.rb migration script (in the attachment migration) calls for a table, filedata which does not exist in vB3. It’s not a problem. I will create a workaround. There are bugs in how forums to categories are migrated. I created a workaround for this already. Maybe my workaround is not perfect but that’s OK. I am still testing.

Let’s not turn this in into a personality discussion. I’m working on a migration. It is a lot of work and it’s slow going; like watching paint dry; but on the other hand it is exciting to see Discourse come to life. I truly am in debt to this community and will contribute back when I get past this “not so fun phase” and get into the “fun phase”, for sure.

I am very appreciative for Discourse - it’s a work of art, and a very fine open source product. It’s brilliant. Thank you. And, the migration script, while a bit buggy for vB3, is workable; and I greatly appreciate that starting point for the migration.

I’m sorry you feel my comments were unfair. It’s my bad, because I have just come out of a few weeks of intensive visits in the Node-RED forum; where the community has such a great attitude toward helping others, that I was put off by my initial experience with a few discourse players, both of which have commercial interests. So far, that is my impression. Sorry about that first impression “over here” compared to “over there”. It was Node-RED and their use of Discourse which convinced me to move our site to Discourse.

While, you may feel my first impressions are unfair, I did not name any names, and I keep my impressions anonymous, which I though was fair at time time. Also, considering my bug report has been basically discounted and ignored by meta (as in, well its only vB3, LOL), what would be fair in your view? Do you want me to delete my “cautionary” comment on commercial interests?

I’m doing the work on the migration; and it’s moving along, bugs in the script and all, because the bugs are just bugs, things to be squashed and then move on.

I do apologize if during this spur of the moment test migration, coming out of a vibrantly supportive Node-RED experience, that I have not been as impressed as I was in the NR Discourse community; but as @michaeld replies to me, he said he does not care if I am “impressed” or “not”; and that is OK. Everyone is entitled to their opinion. I assume that that included my initial opinion / impression, right?

I am very favorability impressed with Discourse and although buggy, the vbulletin. rb script works well enough to get started; and enough to have fun, and that is the most important thing, right?

We should have fun!

I would be a bit more happy with meta if you guys took my bug reports in the vbulletin.rb script more serious; but then again, I understand. We are on vb3 and the message is you are on your own buddy and that is perfectly understandable. I understand.

No one thinks vB3 is fun anymore. LOL Especially ME after over a decade and I am so happy and appreciative for Discourse so we can finally move off of that legacy, past it's prime and time forum and on to this work of modern online art, Discourse.

Just let me know if you want me to delete my just a word of caution comment and I’ll do so, if you really think, after this reply, it is still unfair. I feel it was fair but I do welcome an outside view, as well. Outside views are good, and generally very helpful (and that goes both ways, I hope)


Believe me, I am all for migrating communities off of ancient software. That is one of the primary goals of Discourse.

It’s possible we could support your VB3 → Discourse migration script development work with a financial grant from Discourse, if your results are positive and you can provide evidence that everything is working :hugs:

Hi Jeff,

Thanks for the offer, but I’m OK really; and don’t need any financial support.

I’m “set for life” as they say; and don’t really need more financial resources, I’m lucky as they say, truly blessed; and do not view life as a game to get ‘richer and richer’.

Our site, according to a quick calculation, over its many years, from birth, to peak, and on to “long in the tooth”, has shown content from search results to over 500 million unique unregistered users, maybe more, I don’t track it so closely.

That “good karma” is enough for me, knowing we have helped so many people in need over long IT careers. That’s what it is all about for me (and I assume you as well), it’s not the money, it is the “good karma” of helping others in a tech forum. So, when we upgrade it to Discourse, it will be better for everyone, for sure. I could never code such a work-of-art like Discourse. I’m a cross-domain dabbler and a cybersecurity guy and systems engineer by trade, and am happily retired from public and professional life, for the most part.

The first test migration has gone much better than expected. I have found a few bugs and some things which are just issues unique to our site, like custom BBCODE tags. I can manage it all, it’s not a problem; and then I need to customize it for our community; so there will be some fun work to do there, and I’m looking forward to getting there and past migration 101.

Regarding vb3 there are certainly a lot of legacy vb3 communities out there and it’s great you are interesting in helping them. I agree that vbulletin.rb is not advanced enough to manage migrations for those less techie than us; as I find it the core vbulletin.rb “good enough” and I can easily modify it (and have been doing so as errors arise).

Let me get back to work on this; as I have to change some more things in vbulletin.rb to take into account the errors, which I have been logging in our site, in great detail as I go along. I need to get this done, and it will be done faster if I just do it for now.

Thanks again, for kind offer. All the notes on this, every step of the way, the good, the “not perfect”, and the great, will be over in this link, which I posted earlier

I’ll be happy to jump back in to meta after I get this phase done and dusted and have our users test it, and then give us their feedback. I am confident the majority will want us to move to Discourse and off our legacy… mess.

Thank you again for Discourse. I cannot say enough great things about your generous open source gift to the world.

Honestly, I don’t want to take away your valuable time on this and I realize vb3 is not fun for anyone anymore, and that is especially true for yours truly. I am hopeful that the heavy vb3 boat anchor will be lifted from my neck soon. I can manage it, no problem, I think.

Again, hat’s off to you and the Discourse team for Discourse and thank you and your team for the basic vbulletin.rb migration script. It’s not a problem at all the bugs. If it was too easy, it would not be as interesting!

Actually, the migration is already working fine, but I need to write more custom code for our custom BBCODE and fix a few bugs here and there and run it all again!

Thanks again!

1 Like

Then again,


If you want someone on your team to work with me to fix some of the larger bugs, like the filedata error do to a missing table in vb3, I’m happy to help out, and slow things down, for the benefit of other vb3 communities and to make vbulletin.rb better for vb3.

Let me know. I am OK to slow down and help out, on second thought. For sure, I don’t want to appear selfish, and not a team player, in this caper.

Honestly speaking, I am not a great coding collaborator but am happy to try if it helps out other legacy vb3 users.

1 Like

Wait. First of all, I didn’t say that. I said I was not trying to “impress” you and that was a response to your statement that you were “not impressed by my answer”, which you then removed from your post. Again: this makes me sad.

And no matter if you’re impressed or not, if you feel like you got a cold shoulder or not, you said - behind my back - that I “had (my) hands out looking to make money off this migration” which is just not true. And then there is a lot of words from you but you did not address the fact that this is simply untrue. In fact, you repeated it. And “I am sorry you feel that way” is not an apology.

I still think that this is not a bug and I still think there is something up with the way your forums are stored in your database, either something that is plain “wrong” or something that was acceptable in vB3 but not in vB4.

I never asked you to run vB4, I suggested you migrated your database to it and then run it through the importer. True “unix-style” where you pipe multiple steps to get to the desired outcome - IMHO the shortest and cheapest migration path.

1 Like

This is the proper advice. Is there some reason you can’t upgrade to VB4? Because that might be easier than writing a whole new migratory for VB3.

1 Like


Do us all a favor and please give this a rest.

I can read enough almost as good as the next person, and what you said was:

Maybe consider updating to at least vB 4 first… the importer is mainly targeted to 4.x.

This is quite different than:

I suggested you migrated your database to it and then run it through the importer.

Just give it a rest, @Micheald.

Please stop all this petty back and forth. Please.

It is completely unproductive.

I am truly sorry if you misunderstood my suggestion and even more sorry you found this an “unproductive” comment because it was a well-meant advice.

I would honestly never suggest that someone runs their forum on vB4.

I will now unsubscribe from this topic because I don’t feel you are treating me in a fair manner.


I don’t agree. In fact, according to our legacy vB member control panel, we cannot upgrade to vB4 at all.

Obviously, since our site is the long time vB user, we should have some idea about how this works on the vB side.

I already mentioned that upgrading to vB4 is a non-starter for us.

This is going nowhere (it’s like a circular firing squad, LOL), first it is “migrate to vB4”, then it is “let’s worth together on vB3 and have fun”… then, oh wait, "what we meant was “go migrate to vB4 like you told us was a non started days ago”.

This is really not fun over here at meta LOL.

Let’s please stop the just upgrade your DB to vB4 and life will be great ideas. I have been clear this is a non-starter and is not going to happen.


See for yourselves… no option to upgrade to vB4… It’s a “non option” as I have mentioned.

It should be clear from this image from control panel over at vB… :frowning: