Skip to:
Content

Opened 5 years ago

Closed 4 years ago

#2654 closed defect (invalid)

bbPress 2.6 Database upgrade

Reported by: netweb Owned by:
Milestone: Priority: high
Severity: normal Version:
Component: API - Installation/Upgrade Keywords:
Cc:

Description (last modified by netweb)

With the various post meta tickets we need to update bbPress database for the 2.6 release.

This ticket is to track those update routines

  • #1925 Optimize _bbp_last_active_time to use post_modified instead
  • #2669 Repair tool bbp_admin_repair_forum_meta() incorrectly adding _bbp_forum_id meta keys to forums
  • #2648 Repairing BuddyPress Group Forum relationships only works if the forums were imported
  • #2649 Repair tools should also repair/recount sub forum count meta
  • #2653 Closed topics missing _bbp_status post meta key

Attachments (1)

2654-repair-closed-topics.diff (994 bytes) - added by netweb 4 years ago.

Download all attachments as: .zip

Change History (14)

#1 @netweb
5 years ago

  • Description modified (diff)
  • Removed #2652 from the list as ticket is invalid

#2 @netweb
5 years ago

Per #2669 Repair tool bbp_admin_repair_forum_meta() incorrectly adding _bbp_forum_id meta keys to forums

For #2669 any of the following will be sufficient:

  • Run the repair tool "Recalculate parent forum for each topic and reply"
  • Call bbp_admin_repair_forum_meta() during upgrade
  • Per the SQL below, remove post meta where a forum has a _bbp_forum_id value
SELECT *
FROM  wp_postmeta AS postmeta
INNER JOIN wp_posts AS posts ON ( posts.ID = postmeta.post_id ) 
WHERE post_type =  'forum'
AND postmeta.meta_key =  '_bbp_forum_id'
Last edited 4 years ago by netweb (previous) (diff)

#3 @netweb
5 years ago

  • Description modified (diff)

This ticket was mentioned in IRC in #bbpress-dev by netweb. View the logs.


4 years ago

#5 @tharsheblows
4 years ago

I am not sure if this is the correct place, but the menu_order on topics with > 1000 replies (eg #2556) will probably need recalculating also. It takes a large amount of time though, so there might be a cleverer way of doing it.

#6 @netweb
4 years ago

tharsheblows, I just read your reply in #2556 and we should also do something here for reply menu_order, there is a repair tool to repair the replies menu order in bbPress 2.5.4 and this should be used to repair this, this would also be what we would call as part of the database upgrade.

With that said though this repair tool could do with some refactoring to break it up so it only processes around 1,000 replies at a time, at the moment it tries to do it in one large chunk and that is an issue for larger sites.

#7 follow-up: @tharsheblows
4 years ago

I didn't even see that, argh, sorry. The sad thing is that I looked for it before posting.

If there's no other reason to update the reply menu_order, you'd only have to do it for topics with > 999 replies starting at reply 999.

#8 in reply to: ↑ 7 @netweb
4 years ago

Replying to tharsheblows:

I didn't even see that, argh, sorry. The sad thing is that I looked for it before posting.

;)

If there's no other reason to update the reply menu_order, you'd only have to do it for topics with > 999 replies starting at reply 999.

That is indeed an option, I'll take a look later today once I have electricity again :)

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


4 years ago

#10 @tharsheblows
4 years ago

I've been looking at this and have opened a new ticket for refactoring the menu_order update: #2731 instead of going through that all here where it doesn't seem to quite fit.

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


4 years ago

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


4 years ago

#13 @netweb
4 years ago

  • Keywords needs-patch removed
  • Milestone 2.6 deleted
  • Resolution set to invalid
  • Status changed from new to closed

Going to mark this ticket as invalid and close, none of the tickets mentioned in this ticket "require a database upgrade" for new or improved functionality shipping with bbPress 2.6.

Per #1925 is bumped to 2.7, #2649 is invalid and functionality already exists previous to 2.6, the last 3 tickets #2669, #2648, and #2653 fix or improve on our current post meta, functionality is not broken with bbPress post meta in this current state.

I still think we should "repair" all of this post meta but we should do it after we have our own tests in place to test this update with our repair tools including the ajaxification of these tools per the work started by @tharsheblows in #2731.

Note: See TracTickets for help on using tickets.