Opened 14 years ago
Closed 11 years ago
#2651 closed enhancement (wontfix)
[patch] Exclude and include parameters for bp_has_forum_topic_posts()
Reported by: |
|
Owned by: |
|
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | |
Component: | Forums | Keywords: | |
Cc: |
Description
Allows template to pass along specific topic IDs to the forum topic post loop to include or exclude.
Attachments (1)
Change History (4)
Note: See
TracTickets for help on using
tickets.
Note to self that this patch causes problems with the way that bbPress caches queries. For some reason, when the BB_Query query args contain a post_id parameter (eg '4' for include and '-4' for exclude), bbPress isn't able to locate the cached version of the query results using the key that it generates from an md5 hash of the query itself. Yet the results actually are in the cache, so when bbPress merges the query results with the contents of the cache, you get duplicates of all posts.
A strongarm solution is to clear the bb_post cache when include or exclude arguments are passed. But I would like to investigate some more to see if maybe this is a bug with bbPress that could be fixed at the source (or if there's something wrong with the way I'm trying to pass arguments to bb_query).