Skip to:
Content
Pages
Categories
Search
Top
Bottom

Reply To: Group header file problems

@jaumearagay

Participant

I have:

a.- Updated to BP 2.7.2. <– Still same problems but warnings hidden by my code.

b.- Removed the buddypress folder in my theme with edited files and checked. <– Still same problems: Warnings (as my code did not hide them), “Moderators” tag and “no mods” string.

c.- Downloaded and activated Twenty Sixteen theme. <– Same as in previous step.

And I get the same warning explained in the first entry in this post so it’s not about my modified files and it’s not about a theme problem.

There are still two problems:

1.- The warning points to get_group_moderator_ids( $group_id ) in /wp-content/plugins/buddypress/bp-groups/classes/class-bp-groups-member.php

I don’t have (or have had) moderators in any group so, “Creating default object from empty value” <– What default object from what empty value?

2.- The problem is somewhere else: In line 33 of the group-header.php file (in groups/single/ ) we find this line:

if ( bp_group_has_moderators() ) :

where “bp_group_has_moderators()” is giving a false “true” value as I don’t have moderators in any group so it should not execute in the first place. And after the Moderators tag it says “no mods”, so it on a later step recognizes there are no moderators!!!

Has the bp_group_has_moderators() function or get_group_moderator_ids( $group_id ) function been altered? Or the data about mods and/or admins in the groups?

Because one of them creates two warnings (one before listing the admins and one before listing the mods) that were not there before and also shows a “Moderators” tag that did not appear as the if ( bp_group_has_moderators() ) returned the FALSE value my no-mods groups “deserve” (which it later recognizes when adding the “no mods” string) that now returns this “buggy” TRUE value and shows the tag.

Skip to toolbar