[4000] reattributePosts function does not update topic counts

Started by Yağız..., November 17, 2009, 01:05:33 PM

Previous topic - Next topic

Yağız...

As title says. I tried to reattribute, on a fresh install, Simple Machines' posts to my account, it didn't updated the topic count.

Arantor


Yağız...

SMF 2.0 RC2
Before reattributing:

After reattributing:

Arantor

Then you've reattributed more too; there's only one post that gets made normally.

As for topic count, I'm not convinced that's a bug actually, because it would never have counted to start with. Remember; that test post doesn't have an original user id to tie back to.

Thing to test it: create a test user, get that account to make a post, then delete the user; then create a new user and reattribute it.

Yağız...

Quote from: Arantor on November 17, 2009, 03:42:39 PM
Then you've reattributed more too; there's only one post that gets made normally.

As for topic count, I'm not convinced that's a bug actually, because it would never have counted to start with. Remember; that test post doesn't have an original user id to tie back to.

Thing to test it: create a test user, get that account to make a post, then delete the user; then create a new user and reattribute it.
I already did this, as you can see in the pictures :)

Arantor

But are these posts in new topics, or just reattributing from existing topics?

I don't think it's checked for performance reasons, and I believe standard advice is to ask the forum maintenance to recalculate anyway after reattribution.

Yağız...

There are just "new topics" on my test forum, not a reply at all :)

I tried "Recount all forum totals and statistics" but it didn't work. Maybe there is no code for updating topics in AdminBoardRecount, in ManageMaintenance.php file?

Arantor

Ah, wait a minute.

Can you check the topics table to see if id_member_started is the right user id for your 'admin' user?


Arantor

Well, that's where the bug is, id_member_started isn't being updated if the topic is the first post or the last post in the topic.

I'm not sure we should expect users to have to run Find & Repair (which should fix this)

Reported - Bug #4000: Reattributed posts do not update topics table

Advertisement: