#7440 closed defect (bug) (fixed)
Activity: error using bp_activity_get_actions_for_context() without activity component
Reported by: | espellcaste | Owned by: | boonebgorges |
---|---|---|---|
Milestone: | 2.8 | Priority: | normal |
Severity: | major | Version: | |
Component: | Core | Keywords: | has-patch |
Cc: |
Description
I'm with a problem with BuddyPress Followers not working on profile pages after this change was added: https://buddypress.trac.wordpress.org/changeset/11356
So far I was able to figure it out that it is using a function, bp_activity_get_actions_for_context()
, that's only available if the activity component is active. As this particular component is not needed in my community, it is throwing an error.
[08-Feb-2017 12:45:49 UTC] PHP Fatal error: Uncaught Error: Call to undefined function bp_activity_get_actions_for_context() in /srv/www/blog/htdocs/wp-content/plugins/buddypress/src/bp-templates/bp-legacy/buddypress-functions.php:692
Stack trace:
#0 /srv/www/blog/htdocs/wp-includes/class-wp-hook.php(298): bp_legacy_theme_ajax_querystring(, 'members')
#1 /srv/www/blog/htdocs/wp-includes/plugin.php(203): WP_Hook->apply_filters(, Array)
#2 /srv/www/blog/htdocs/wp-content/plugins/buddypress/src/bp-core/bp-core-template.php(1266): apply_filters('bp_ajax_queryst...', , 'members')
#3 /srv/www/blog/htdocs/wp-content/themes/irb-5.7/buddypress/members/members-loop.php(26): bp_ajax_querystring('members')
#4 /srv/www/blog/htdocs/wp-includes/template.php(687): require('/srv/www/blog/h...')
#5 /srv/www/blog/htdocs/wp-content/plugins/buddypress/src/bp-core/bp-core-template-loader.php(155): load_template('/srv/www/blog/h...', false)
#6 /srv/www/blog/htdocs/wp-content/plugins/buddypress/src/bp-core/bp-core-template-loader.php(61): bp_locate_template(Array, true, in /srv/www/blog/htdocs/wp-content/plugins/buddypress/src/bp-templates/bp-legacy/buddypress-functions.php on line 692
I'm attaching a patch for a quick fix. I presume you guys will decide for a better/new way.
Attachments (1)
Change History (5)
#1
@
8 years ago
- Milestone changed from Awaiting Review to 2.8
- Summary changed from BP Activity Actions for Content Function Error to Activity: error using bp_activity_get_actions_for_context() without activity component
From the logic in
bp_legacy_theme_ajax_querystring()
I'd say the cookie check implies that once the cookie exists, the activity component should be active. Though, when the activity component is deactivated again, the cookie'd filter still exists, so the function naturally breaks. A valid bug, I guess.