News:

Wondering if this will always be free?  See why free is better.

Main Menu

Postcount for new users, and some other oddities

Started by whoey, November 28, 2013, 09:25:55 AM

Previous topic - Next topic

whoey

I have been helping to maintain a board for some time and we migrated quite some time ago from SMF 1.x to SMF 2.x, it's currently on 2.0.6, and has quite a few mods installed. One of the moderators recently noticed a new user with a 0 post count, although the user had posted 1 time. I ran "Recount all forum totals and statistics" which completed, but did not seem to effect the user's true post count, afterwards I ran "Find and repair any errors" which turned up a bunch of errors on old posts:

QuoteThe following errors are fouling up your forum:

    Topic #6680 has the wrong number of replies, 105.
    Topic #6681 has the wrong number of replies, 3.
    Topic #6682 has the wrong number of replies, 58.
    Topic #6683 has the wrong number of replies, 20.
    Topic #17765 has the wrong number of replies, 4.
    Topic #17766 has the wrong number of replies, 3.
    Topic #17767 has the wrong number of replies, 34.
    Topic #17768 has the wrong number of replies, 24.
    Topic #17770 has the wrong number of replies, 4.
    Topic #17771 has the wrong number of replies, 19.
    Topic #17772 has the wrong number of replies, 0.
    Topic #18952 has the wrong number of replies, 8.
    Topic #18954 has the wrong number of replies, 0.
    Topic #18955 has the wrong number of replies, 80.
    Topic #20034 has the wrong number of replies, 0.
    Topic #20035 has the wrong number of replies, 5.
    Topic #20036 has the wrong number of replies, 4.
    Topic #20037 has the wrong number of replies, 4.
    Topic #20690 has the wrong number of replies, 52.
    Topic #20691 has the wrong number of replies, 4.
    Topic #20692 has the wrong number of replies, 47.
    Topic #20693 has the wrong number of replies, 3.
    Topic #20694 has the wrong number of replies, 1.
    Topic #20695 has the wrong number of replies, 10.
    Topic #20696 has the wrong number of replies, 0.
    Topic #20697 has the wrong number of replies, 33.
    Topic #23069 has the wrong number of replies, 3.
    Topic #26732 has the wrong number of replies, 12.
    Topic #26735 has the wrong number of replies, 7.
    Topic #28010 has the wrong number of replies, 5.
    Topic #30764 has the wrong number of replies, 4.
    Topic #30765 has the wrong number of replies, 12.
    Topic #30766 has the wrong number of replies, 2.
    Topic #30767 has the wrong number of replies, 0.
    Topic #30768 has the wrong number of replies, 9.
    Topic #30770 has the wrong number of replies, 13.
    Topic #30771 has the wrong number of replies, 7.
    Topic #30772 has the wrong number of replies, 4.
    Topic #30773 has the wrong number of replies, 7.
    Topic #30776 has the wrong number of replies, 8.
    Topic #31607 has the wrong number of replies, 1.
    Topic #31608 has the wrong number of replies, 23.
    Topic #31615 has the wrong number of replies, 5.
    Topic #32320 has the wrong number of replies, 4.
    Topic #32321 has the wrong number of replies, 2.
    Topic #32322 has the wrong number of replies, 0.
    Topic #32323 has the wrong number of replies, 15.
    Topic #32327 has the wrong number of replies, 0.
    Topic #33184 has the wrong number of replies, 1.
    Topic #33185 has the wrong number of replies, 0.
    Topic #33189 has the wrong number of replies, 0.
    Topic #33192 has the wrong number of replies, 9.
    Topic #34464 has the wrong number of replies, 48.
    Topic #34466 has the wrong number of replies, 6.
    Topic #35122 has the wrong number of replies, 30.
    Topic #35123 has the wrong number of replies, 0.

Topics are now somewhere around 48000 range... so these are old errors that keep popping up. If I rerun the recount stats after "repairing" the above, then rerun the check for errors they come back. The same is true if I repair the database in PhpMyAdmin. This had happened before, but at some point with some other versions of SMF it stayed fixed, not so with current. The stranger thing is that the topics with number of replies errors above are not deleted, yet cannot be accessed even with manual insertion of the topic number in the URL.

Further investigation of some of the newly signed up users showed another user with 1 post in postcount, but yet has 2 posts visible. I have checked that postcount is enabled in ALL boards, and even disabled and reenabled in the boards the user posted in, reran the recount... and am really confused as to what is going on here, but am obviously stuck in a loop.

This board has had numerous issues over the years, including most recently issues with attachments some of which the files do not seem to link through correctly even though the file exists. I finally managed to complete the "Attachment Integrity Check" only after manually skipping steps and substeps to do partial repairs and eventually I had to make the substeps 100 instead of the default 500. It currently has over 5000 registered users, almost 800,000 posts in 45,000+ topics. The owner does not want anything pruned, and the database currently sits at about 675MB. I know that there is definitely something corrupt somewhere, but I'm not really sure where to go from here, and something like an erroneous postcount seems really bad.

I'm really not sure where to go from here, obviously there's a glitch somewhere, just wondering if anyone else has any ideas that don't involve losing a pile of posts.

Thanks!

whoey

Nothing like a little digging in the database to bore you to tears... I discovered the above list in "smf_topics" the references to "id_first_msg" referred to a post that did not exist, so by crosschecking the first post in "smf_messages" and editing the "smf_topics" "id_first_msg" to reflect the first existing post in the thread I have managed to clear out half that list, just thought I'd clarify that before carrying on.

This is most likely the result of what eventually made us put an edit/delete limitation in as an angry member went back and edited/deleted all his posts as the first available post in each thread appears to be a reply to an original topic.

whoey

confirmed, that cleared up the errors, but still no idea on the postcount issue...

whoey

I have manually adjusted the counts for both users that were not correct in the database.

what's with the views on this thread... 3000+ in a few hours? I doubt it...

Arantor

Bots are a wonderful thing ;)

As for the counts, yeah they're not magically recalculated anywhere. Though you can edit them from the user's profile > account settings without having to touch the DB manually.

whoey

like I said, I did it in PhpMyAdmin... since I was already digging around...

I went back through the last 25 or so user signups on our forum, and only the two we found had erroneous postcounts. I'm guessing it was a time flux quantum abnormality or some other such voodoo of IT.   ;D

As far as I'm concerned this is solved for the moment.

whoey

Quote from: Arantor Beeblebrox the First on November 28, 2013, 12:09:32 PM
Bots are a wonderful thing ;)

As for the counts, yeah they're not magically recalculated anywhere. Though you can edit them from the user's profile > account settings without having to touch the DB manually.

http://custom.simplemachines.org/mods/index.php?mod=2324
Seems to help recount member posts, this should be part of the maintenance routines by default.

Advertisement: