[buddypress-trac] [BuddyPress Trac] #5871: bp_get_the_post_class() can generate an error if the groups component is deactivated
buddypress-trac
noreply at wordpress.org
Wed Sep 10 15:05:35 UTC 2014
#5871: bp_get_the_post_class() can generate an error if the groups component is
deactivated
--------------------------+-----------------------
Reporter: imath | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: 2.1
Component: Core | Version: 1.2
Severity: normal | Keywords: has-patch
--------------------------+-----------------------
I think it's an edge case, but as it happened to me, i guess it can happen
to someone else ;)
Steps to reproduce :
1. Activate the groups component,
2. Deactivate it
3. go to site.url/groups (the page exists as it was created at step 1)
Fatal error due to {{{bp_is_group()}}} check at line 2451 of {{{bp-core-
template.php}}}
In bp_is_group() problem is due to the use of
{{{groups_get_current_group()}}}
I think we should use {{{bp_is_active( 'groups' )}}} in the
{{{bp_is_group()}}} function before trying to get the current group. See
attached patch.
--
Ticket URL: <https://buddypress.trac.wordpress.org/ticket/5871>
BuddyPress Trac <http://buddypress.org/>
BuddyPress Trac
More information about the buddypress-trac
mailing list