Invision Community 4: SEO, prepare for v5 and dormant account notifications By Matt November 11, 2024
Gabriel Torres Posted December 11, 2017 Posted December 11, 2017 Hi, Two days ago I launched the "recount posts" background task for all users in our forums. Today, we noticed that all counters are now completely incorrect. A few examples: http://www.clubedohardware.com.br/profile/664373-rodrigodcvieira/ mysql> SELECT member_posts FROM core_members WHERE member_id='664373'; +--------------+ | member_posts | +--------------+ | 26252 | +--------------+ mysql> SELECT count(*) FROM forums_posts WHERE author_id='664373'; +----------+ | count(*) | +----------+ | 6566 | +----------+ http://www.clubedohardware.com.br/profile/774412-zucchini/ mysql> SELECT member_posts FROM core_members WHERE member_id='774412'; +--------------+ | member_posts | +--------------+ | 8006 | +--------------+ mysql> SELECT count(*) FROM forums_posts WHERE author_id='774412'; +----------+ | count(*) | +----------+ | 5646 | +----------+ http://www.clubedohardware.com.br/profile/748347-marcos-frm/ mysql> SELECT member_posts FROM core_members WHERE member_id='748347'; +--------------+ | member_posts | +--------------+ | 1842 | +--------------+ mysql> SELECT count(*) FROM forums_posts WHERE author_id='748347'; +----------+ | count(*) | +----------+ | 462 | +----------+ Is anyone else facing the same issue?
newbie LAC Posted December 12, 2017 Posted December 12, 2017 Hello, Not a bug. In this case member posts is Quote the number of posts, comments, etc. the user has made on your site. You counted only posts
Daniel F Posted December 12, 2017 Posted December 12, 2017 Yea, what @newbie LAC said. You have to keep in mind that the member posts column contains the sum of ALL the content and not only posts.
Gabriel Torres Posted December 12, 2017 Author Posted December 12, 2017 @newbie LAC @Daniel F What other content is counted? Because for a regular user, I don't understand what other content would be added besides posts. Private messages? See the case of the first user. He is a regular user and we are talking about a discrepancy of 20,000 items. I can't imagine what other 20,000 items this user has created. Because before I ran the task, the counters were reflecting the number of posts for these users.
newbie LAC Posted December 13, 2017 Posted December 13, 2017 5 hours ago, Gabriel Torres said: What other content is counted? %Application items%, %Application item comments%, %Application item reviews% Example Calendar events, calendar event comments, calendar event reviews, gallery images, gallery image comments, etc. 5 hours ago, Gabriel Torres said: Private messages? No. 8 hours ago, Gabriel Torres said: See the case of the first user. He is a regular user and we are talking about a discrepancy of 20,000 items. I can't imagine what other 20,000 items this user has created. Looks like incorrect value I recounted content for that user
Gabriel Torres Posted December 14, 2017 Author Posted December 14, 2017 @newbie LAC But that is exactly my issue. Recounting individually works fine. The issue was caused by using the recounting option for all users as a background task. After running this task, all counters from users were incorrect.
Nathan Explosion Posted December 14, 2017 Posted December 14, 2017 Then log a ticket....and I know your unique situation with plugins and support, but if there is a bug with the functionality then get it reported.
Gabriel Torres Posted December 14, 2017 Author Posted December 14, 2017 @Nathan Explosion I am not allowed to open tickets, hence the only support I can get is through other members like yourself. That is why I am asking if this is happening on other boards as well. Could you run the recount background task to see if this issue also happens on your board? I need to make sure this isn't caused by a modification we might have.
Nathan Explosion Posted December 14, 2017 Posted December 14, 2017 Works fine, hence my post. Disable everything, try it yourself....go from there. You know the drill by now.
Gabriel Torres Posted December 15, 2017 Author Posted December 15, 2017 @Nathan Explosion Thanks, will try that!
newbie LAC Posted December 27, 2017 Posted December 27, 2017 After debugging made on weekend I can confirm a bug. POC - Enable - Create new article - Add comments Now starts interesting thing. When someone viewing the database pages (articles, database, categories) (background task running in this time) the Record comments class is IPS\cms\Records\CommentTopicSync%DB_ID% \applications\cms\sources\Records\CommentTopicSync.php public static $databaseTable = 'forums_posts'; So the system counts ALL member forums posts for every cms database (if enabled posting). The query looks like SELECT COUNT(*) FROM forums_posts WHERE author_id=X; Gabriel Torres provided me some examples after the task has been finished Results etc. Tested also locally. IPS 4.2.6 and IPS 4.2.7 Beta 4. Fresh installation. Simple code to recount content for specific user Ticket #996114
Gabriel Torres Posted January 11, 2018 Author Posted January 11, 2018 @newbie LAC Upgraded to 4.2.7, recounted and the bug is still present, FYI.
newbie LAC Posted January 12, 2018 Posted January 12, 2018 7 hours ago, Gabriel Torres said: @newbie LAC Upgraded to 4.2.7, recounted and the bug is still present, FYI. Maybe IPS fixed it in 4.3.
SoloInter Posted January 13, 2018 Posted January 13, 2018 @Mark ? I need to recount the points and posts of my members. But it seems that there is a problem. Corrected in 4.3?
SoloInter Posted January 13, 2018 Posted January 13, 2018 Cool, I'll wait for the new version to come out then.
Recommended Posts
Archived
This topic is now archived and is closed to further replies.