Skip to:
Content

Opened 3 years ago

Last modified 21 months ago

#2876 new defect

freshness repair tool incorrect and conflation of ID and post_date

Reported by: tharsheblows Owned by:
Milestone: 2.7 Priority: high
Severity: normal Version:
Component: General - Performance Keywords: needs-testing
Cc:

Description

There are problems with the repair tools when the ID doesn't go as post_date (ie if ID = 2 has a post_date of today but ID = 3 has a post_date of yesterday) and I've come across this again in the "Recalculate last activity in each topic and forum" repair tool.

Attached is my fix as an example of what I mean -- it's off of 2.5.8, needs to be optimised and there's no backwards compatibility for bbp_get_public_child_ids (it was just a quick and dirty fix to get my sample data sorted correctly) so it's not a proper patch. I'm including it because it shows exactly what the issue is.

I can do a real patch for this but would appreciate any suggestions about how to make the queries more efficient or anything that I'm missing.

Attachments (1)

latest_activity.patch (8.8 KB) - added by tharsheblows 3 years ago.
sample fix for latest activity tool

Download all attachments as: .zip

Change History (6)

@tharsheblows
3 years ago

sample fix for latest activity tool

#1 @netweb
3 years ago

  • Milestone changed from Awaiting Review to 2.6

#2 @netweb
3 years ago

Related: #2533

#3 @casiepa
3 years ago

@tharsheblows
In the patch you refer to wp_posts, I suppose that should be $wpdb->posts.
Pascal.

This ticket was mentioned in Slack in #bbpress by netweb. View the logs.


3 years ago

#5 @johnjamesjacoby
21 months ago

  • Component changed from Tools to General - Performance
  • Keywords needs-testing added; dev-feedback removed
  • Milestone changed from 2.6 to 2.7
  • Priority changed from normal to high

The patch here needs some work, and test aren't passing with it applied, so I'm going to bump this to 2.7 to look into further.

Note: See TracTickets for help on using tickets.