MyBB Community Forums

Full Version: Missing posts but more users after import from SMF 2.0
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hello everyone!

I have a SMF forum since 2010 and I'm starting to look around for a better alternative (paid or free, doesn't matter much). The crucial part is the migration, I must keep all users, topics and posts and internal links (I'll do my best to "fix" them with apache's mod-rewrite). The settings can be re-done once it's all set-up.

My main target for the alternative forum software is MyBB due to its merge system and its looks. Love it!
I'm playing with the new forum from some time, but the main think that bugs me is the huge difference between post and user counts from SMF and MyBB forums.

The report from merge system says:
Users: 7,536
Threads: 8,533
Posts: 131,390
Attachments: 3,416

The stats from MyBB are:
Users: 7,536 (WTF, more users? Even if I add the unapproved - 90 at this point, this doesn't add up)
Threads: 8,533 (difference is due to 2 days old backup)
Posts: 81,684
Attachments: 3,416 (some of the difference is due to the 2 days old backup, but can't be this huge)

And here are the stats from the source (SMF 2.0):
Users: 7,396
Threads: 8,535 
Posts: 131,552
Attachments: 3,466

The error list is empty. Do you have any ideas what can I do or check? Yes, I did the Recount & Rebuild.
Quote:The stats from MyBB are:
Users: 7,536 (WTF, more users? Even if I add the unapproved - 90 at this point, this doesn't add up)
Threads: 8,533 (difference is due to 2 days old backup)
Posts: 81,684
Attachments: 3,416 (some of the difference is due to the 2 days old backup, but can't be this huge)

And here are the stats from the source (SMF 2.0):
Users: 7,396
Threads: 8,535
Posts: 131,552
Attachments: 3,466

Where do this statistics come from? Statistics read from AdminCP from each forum software may be inaccurate and for some database engine (eg InnoDB) the row count reported in table view may also be inaccurate.

Could you please run some SQL query on your SMF and MyBB databases to get these row counts? The query may like
SELECT COUNT(*) FROM smf_members;
SELECT COUNT(*) FROM smf_topics;
SELECT COUNT(*) FROM smf_messages;
SELECT COUNT(*) FROM smf_attachments;
SELECT COUNT(*) FROM mybb_users;
SELECT COUNT(*) FROM mybb_threads;
SELECT COUNT(*) FROM mybb_posts;
SELECT COUNT(*) FROM mybb_attachments;

The merge system will try to convert as may records as possbile from your old forum's database. There could be some circumstances where threads/posts may get disposed due to corrupted/inconsistent data in the old forum's database. For example, a post without proper thread to get linked to.
Thank you for the lightning replay! The stats are from the AdminCP. Here are the query results:

-- From the backup, which was used to do the merge
SELECT COUNT(*) FROM smf_members;     -- 7536
SELECT COUNT(*) FROM smf_topics;      -- 8533
SELECT COUNT(*) FROM smf_messages;    -- 131390
SELECT COUNT(*) FROM smf_attachments; -- 7070

SELECT COUNT(*) FROM mybb_users;       -- 7536
SELECT COUNT(*) FROM mybb_threads;     -- 8533
SELECT COUNT(*) FROM mybb_posts;       -- 131390
SELECT COUNT(*) FROM mybb_attachments; -- 3416

Hmmm, interesting. The post and user counts match-up! So it seems they're OK.

The SMF's attachments directory count:
... forum/attachments]# ls -1 | wc -l
6853
I have 307 uploaded avatars and 1 default (both in other directory)
(2020-05-28, 01:38 PM)Pyrhel Wrote: [ -> ]Thank you for the lightning replay! The stats are from the AdminCP. Here are the query results:

(...)

Hmmm, interesting. The post and user counts match-up! So it seems they're OK.

Yeah I guess the tables are using the InnoDB engine, there's a random answer on Why is the estimated rows count very different in phpmyadmin results? https://stackoverflow.com/a/11926300/6681141

Oh, sorry I'm wrong about these statistics and I'll reply later with a proper guess/explanation.

(2020-05-28, 01:38 PM)Pyrhel Wrote: [ -> ]The SMF's attachments directory count:
... forum/attachments]# ls -1 | wc -l
6853
I have 307 uploaded avatars and 1 default (both in other directory)

I see that in SMF attachments and their thumbnails and user uploaded avatars are all stored in the attachments table, that's why you read a much larger number of records in SMF's attachments table. If the merge system's report doesn't indicate any errors, I bet all attachments and avatars, including database records and real attachment files (though some files might be fake ones) are converted and stored in MyBB's database and the uploads/ folder. Please check them in your MyBB installation.
Seems statistics for SMF is from board index and for MyBB can be read from board index or AdminCP.
  • For different user count:
    SMF's number of users listed in board index doesn't include users awaiting activation.
  • For different threads/posts count:
    I haven't dive too much into how SMF count threads/posts numbers, but MyBB's ones don't include soft-deleted threads/posts.

There could be another reason that the stats are different. If you used the merge system downloaded from https://mybb.com/download/ , you may suffer from a bug that causes some threads/posts getting a wrong visible status (normal / soft-deleted / unapproved). If there are threads/posts having wrong visible status, MyBB won't count them or include them in the total numbers.