my dog learned polymorphism
The moose likes JForum and the fly likes import tool minor bugs Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » JForum
Bookmark "import tool minor bugs" Watch "import tool minor bugs" New topic

import tool minor bugs

Migrated From
Ranch Hand

Joined: Apr 22, 2012
Posts: 17424

I made an import today, and I was faced with a few problems:

1) installer classpath and so on (someone else complained here about the
same issue, I fixed it just as the other person, by copying some
- I used the linux version (here is another problem, you'd better add
#!/bin/sh on top of the sh file)

2) import stopped during importing users because of user_timezone. Fixed
it by updating all users.user_timezone to 2.00 (somewhere '-12.00' in
old database)

3) Importing anonymous update...
UPDATE jforum_users SET user_id = 1 WHERE user_id = -1
This failed because there was already a user_id=1 in phpBB database.
Luckily, that user never posted and I fixed it by deleting that user
from phpbb database.

I had a look on sources (2.1.8 and 3) : nice work, clean, commented code
- congrats!
[originally posted on by mosu]
Migrated From
Ranch Hand

Joined: Apr 22, 2012
Posts: 17424
query.update.anonymous = UPDATE jforum_users SET user_id = 1 WHERE user_id = -1

The above sql is executed during phpBB conversion, but this step is no enough,
you also have to update jforum_user_id = 1 where jforum_user_id=-1 for posts and topics

-- update jforum_posts set user_id=1 where user_id=-1
-- update jforum_topics set user_id=1 where user_id=-1

There could be some posts with anonymous user (ex deleted user etc). This will fix some errors when try to display poster's username
${topic.postedBy.username }

[originally posted on by mosu]
I agree. Here's the link:
subject: import tool minor bugs
It's not a secret anymore!