Not Solved IPB 3 to mbb 1.8
#1
Not Solved
Has anyone converted from an old IP3 board to the latest version of 1.8?

My board is from 2010, yep an oldie that I was hoping to bring back to life as there are 10 years worth of posts on there.


I managed to get the merge script to connect to my old forum, the first two steps completed but then it hangs up and throws up an sql error 

"merge 1062 - duplicate entry '' for key 'username'

It goes no further after this.

Not really sure where to go from here.

Thanks.
Reply
#2
Not Solved
Try the version from my repository as that is the latest with updates.
https://github.com/Sama34/merge-system
Send me a DM or PM if you want to sponsor any update or addition to my plugins.

[Image: signature.png]

Discord omar.gonzalez (Omar G.#6117); Telegram at @omarugc;
Reply
#3
Not Solved
I'm going to try it now, I will report back and let you know if it works. Thank you.

Everything merged over, thanks again for the help. Very happy about that Smile
Reply
#4
Not Solved
I just converted from IPB 3 to myBB, and for the most part everything went smoothly. The one thing I can't figure out is why the post counts  are all showing 0. I did the recount and rebuild, but everything is still zero. Looking in mybb_threads, the field uid has 0 in that column, but the uid in mybb_posts is populated.
Reply
#5
Not Solved
Do you have any old backup to analyze, you must review what is the part that is broken, however you can fix it with some tools maybe or by modifying the code or an SQL sentence, but on the end it must be verified why the merge goes wrong, but i have never used before that system.

We can help you maybe if we have more information about it, an old backup in private share maybe should help to try to understand why the merge goes wrong. And sent you more useful tips or an script to fix it.
The only infinite thing is the universe and human stupidity, but the universe is not for sure

Plugins 1.6.x

Plugins 1.8.x

Reply
#6
Not Solved
I figured it out, but it was a bit of work.

First, I ran an update mybb_posts.uid

UPDATE mybb_posts p
JOIN mybb_users u ON BINARY TRIM(p.username) = BINARY TRIM(u.username)
SET p.uid = u.uid
WHERE p.uid != u.uid;

Second, I ran a query to update mybb_threads.uid

UPDATE mybb_threads t
JOIN mybb_posts p ON t.tid = p.tid AND t.dateline = p.dateline
SET t.uid = p.uid
WHERE t.uid = 0;

Third, I ran a query to update mybb_threads.lastposteruid

UPDATE mybb_threads t
JOIN mybb_posts p ON t.tid = p.tid AND TRIM(t.lastposter) = TRIM(p.username)
SET t.lastposteruid = p.uid
WHERE t.lastposteruid = 0;

Then I went into MyBB Admin CP → Tools & Maintenance → Recount & Rebuild and ran these tools:

1. Rebuild Thread Counters
2. Rebuild Forum Counters
3. Recount Statistics

I was looking at the mybb_privatemessages table, and uid, toid, and fromid are all showing the old Invision user id's. However, there were no names associated with any of these fields. I noticed that the myBB board had the uid start at 50 for all members except for the admin account, which had a uid of 1 (The board is a private family board with ~40 members). I ran a query in the invision database that pulled the memberid and name from the table ibf_members. I then ran a query in mybb_users to pull the uid and username. I put both lists into excel and did an xlookup to create a table with uid, username, and memberid. I put that into a temp table called temp_pm_map:

CREATE TABLE temp_pm_map (
    old_id INT,
    username VARCHAR(255),
    new_id INT
);

INSERT INTO temp_pm_map (old_id, username, new_id) VALUES
(1, 'Admin', 1),
(5, 'JaneDoe', 50),
(12, 'JohnSmith', 51)
...;

I ran the following queries to update mybb_privatemessages and drop the temp table

-- 1. Update the 'uid' (the folder owner)
UPDATE mybb_privatemessages pm
JOIN temp_pm_map map ON pm.uid = map.old_id
SET pm.uid = map.new_id;

-- 2. Update the 'toid' (the recipient)
UPDATE mybb_privatemessages pm
JOIN temp_pm_map map ON pm.toid = map.old_id
SET pm.toid = map.new_id;

-- 3. Update the 'fromid' (the sender)
UPDATE mybb_privatemessages pm
JOIN temp_pm_map map ON pm.fromid = map.old_id
SET pm.fromid = map.new_id;

DROP TABLE temp_pm_map;

Then I went into MyBB Admin CP → Tools & Maintenance → Recount & Rebuild and ran these tools:

1. Rebuild Recount Private Messages
2. Recount Statistics

Unfortunately, I could not see a log file anywhere showing what happened when the merge occurred. I'm not sure if there was a setting somewhere I should have enabled but didn't, but I've looked and can't find anything.

I also had  IP.Gallery installed on my old board. That did not move over. It was a bit of work, but I was able to was able to create a page that linked to the folders containing the uploaded images (which I left in the old Invision uploads directory). Unfortunately, anything that was posted inside that module giving commentary on the pictures hasn't been added, as I haven't had time to muck around with it. It isn't pretty, but at least people have access to the pictures.


Attached Files Thumbnail(s)
   
Reply
#7
Not Solved
Yeah it was a bit of work, by default mybb does not have a gallery integrated, but there is a plugim for gallery system, it has to make another script to migrate from your gallery to EZ Gallery or similar, i am not sure about the name of the plugin. But i think that one should help you to try to migrate the current gallery to the new one.

Thanks for sharing the information, that for sure should help to another users to do the same job, and maybe for someone else to analyze deeply, why this happens with mybb merge system.
The only infinite thing is the universe and human stupidity, but the universe is not for sure

Plugins 1.6.x

Plugins 1.8.x

Reply
#8
Not Solved
(2026-10-15, 01:41 PM)ericptak Wrote: [...] Looking in mybb_threads, the field uid has 0 in that column, but the uid in mybb_posts is populated.

(2026-10-16, 12:48 AM)ericptak Wrote:
UPDATE mybb_posts p
JOIN mybb_users u ON BINARY TRIM(p.username) = BINARY TRIM(u.username)
SET p.uid = u.uid
WHERE p.uid != u.uid;

The queries look highly questionable.
Send me a DM or PM if you want to sponsor any update or addition to my plugins.

[Image: signature.png]

Discord omar.gonzalez (Omar G.#6117); Telegram at @omarugc;
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)