Skip to:
Content

bbPress.org

Opened 12 years ago

Closed 12 years ago

Last modified 12 years ago

#2312 closed defect (bug) (fixed)

bbp_clean_post_cache() uses wrong cache group

Reported by: wpdennis's profile wpdennis Owned by:
Milestone: 2.3.1 Priority: normal
Severity: critical Version: 2.3
Component: API - Cache Keywords: dev-feedback has-patch needs-testing
Cc:

Description

bbp_clean_post_cache() uses the "old" cache group. The group name has changed in 2.3 (4848).

I checked the code for these groups and, as far as I can tell, it should look like this (last parameter of each wp_cache_delete()):

foreach ( $post_types as $post_type ) {
		wp_cache_delete( 'bbp_get_forum_'     . $_post->ID . '_reply_id',                              'bbpress_posts' );
		wp_cache_delete( 'bbp_parent_'        . $_post->ID . '_type_' . $post_type . '_child_last_id', 'bbpress_posts' );
		wp_cache_delete( 'bbp_parent_'        . $_post->ID . '_type_' . $post_type . '_child_count',   'bbpress_posts' );
		wp_cache_delete( 'bbp_parent_public_' . $_post->ID . '_type_' . $post_type . '_child_ids',     'bbpress_posts' );
		wp_cache_delete( 'bbp_parent_all_'    . $_post->ID . '_type_' . $post_type . '_child_ids',     'bbpress_posts' );
	}

Change History (5)

#1 @johnjamesjacoby
12 years ago

  • Keywords has-patch needs-testing added
  • Milestone changed from Awaiting Review to 2.3.1

Good catch. Moving to 2.3.1.

#2 follow-up: @wpdennis
12 years ago

I patched it in a productive environment right now. It solved an error, where the post meta _bbp_reply_count wasn't updated in bbp_update_topic_reply_count().

I'll report back, if I find any troubles because of these changes.

#3 @johnjamesjacoby
12 years ago

  • Resolution set to fixed
  • Status changed from new to closed

(In [4862]) Use correct cache group in bbp_clean_post_cache(). Props wpdennis. Fixes #2312 (2.3 branch)

#4 @johnjamesjacoby
12 years ago

(In [4863]) Use correct cache group in bbp_clean_post_cache(). Props wpdennis. Fixes #2312 (trunk)

#5 in reply to: ↑ 2 @johnjamesjacoby
12 years ago

Replying to wpdennis:

I patched it in a productive environment right now. It solved an error, where the post meta _bbp_reply_count wasn't updated in bbp_update_topic_reply_count().

I'll report back, if I find any troubles because of these changes.

Thanks. Confirmed fixed here also. Feel free to reopen if there are any adverse effects.

Note: See TracTickets for help on using tickets.