#7848 closed defect (bug) (fixed)
Using the legacy activity query causes notices
Reported by: | r-a-y | Owned by: | r-a-y |
---|---|---|---|
Milestone: | 3.1.0 | Priority: | normal |
Severity: | normal | Version: | 3.0.0 |
Component: | Activity | Keywords: | has-patch commit |
Cc: |
Description
The incremented cache improvements introduced in r11101 (see #7245) causes some notices if the legacy activity query is force-enabled and when the 'count_total'
parameter is passed to bp_activity_get()
.
See https://buddypress.org/support/topic/new-update-white-screen/#post-273276
The problem is due to the $cache_group
not being defined in the legacy activity query.
Attachments (1)
Change History (7)
#3
@
6 years ago
- Keywords commit added
If I'm reading the patch correctly, it'll prevent notices because $cache_group
will be defined, but the cache will always be empty for these items (unless they're set by another instance of the activity query that is *not* running in legacy mode). Is that right? That seems fine to me - no need to sink time into wrapping caching around these old queries - but I just want to be sure I understand it correctly :)
#4
@
6 years ago
You're correct that the main activity DB query would not be cached in legacy mode, but it would cache the activity total count:
https://buddypress.trac.wordpress.org/browser/tags/3.0.0/src/bp-activity/classes/class-bp-activity-activity.php?marks=742,745#L729
I copied the preg_match
stuff from r11101, which I believe should also catch legacy queries, but I haven't fully tested.
Milestone renamed