Admin Tool to Rebuild post attach_count for all posts based on actual number of attachments

rfc0001

Well-known member
Would be nice to have Admin > Tools > Rebuild (admin.php?tools/rebuild) option to rebuild all post attach_counts based on actual # of attachments associated with post id.
 

Jake B.

Well-known member
Realistically this seems like a really specific issue to have, would probably be better to include this as an option on the rebuild thread job or something similar. Assuming add-ons use the attachment handler (which they should 100% of the time) this is a non issue and will never happen, the issue only comes into play when something improperly inserts or removes data from attachment tables
 

ozzy47

Well-known member
Although this should not really be needed, it would be nice to have as a backup in case something happens.
 

Jake B.

Well-known member
Might make sense to have it rebuild attachment counts when post positions are rebuilt within the rebuild threads job, but as a completely separate standalone option doesn't seem all that useful
 

ozzy47

Well-known member
Might make sense to have it rebuild attachment counts when post positions are rebuilt within the rebuild threads job, but as a completely separate standalone option doesn't seem all that useful
It would only be useful if some third party source messed up the database as you said earlier.
 

Jake B.

Well-known member
That add-on still just runs a single query to update everything, I definitely wouldn't recommend running it if you have a large number of posts.
 
Top