Does anyone have the same problem or do I have a fight between plugins goin on? 😉
I have the same error. What theme are you using? I am using Kleo.
@manueldo, which bp version do you use ?
Hi @danbp, my bp version is 2.7.2
Well, you now have to control your child theme and custom functions (if any).
Seems that changes made in BP 2.7, 2.7.1 and 2.7.2 won’t apply to your case.
Read also here.
And if it doesn’t help, go to kleo support and ask there.
Thanks @danbp, I will try to fix it.
@manueldo, I’m using a child theme for Canvas from Woo.
I’m so busy this week with something else… I’ll update to 2.7.2. probably on the weekend. I’ll keep you posted! 😉
Thanks @jaumearagay! I´ll do the same.
Hiya. I too have this error since updating to 2.7.2. We haven’t made any other changes in a while. It appears on each group page. I’m running Sweetdate theme also by seventhqueen. The error appears on the master theme preview, not just the active child theme.
@pauldyke,
did you check your templates ? Have you tried to use 2016, to ensure that it is/or not a theme issue ?
If it appears to be a theme issue, you have to contact seventhqueen, as we can’t assist you for premium themes.
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.
I asked seventhqueen for help and they said the problem is from buddypress, they can not help.
When you have a private group and go to approve some member the warning is showed but after approving, when the page reload saying that the membership was approved, the warning dissapears, is the only page where the warning is not being showed.
Hi @jaumearagay-
Unhappily, I’m not able to reproduce your problem on my servers. Can you test something for me in your environment where we know the problem exists? I’d like to know what the value of $group_mods
is before it’s passed to the foreach
in get_group_moderator_ids()
.
I’ve added a var_dump()
in this snippet: http://pastie.org/10962912
Please let me know what you find.
Thanks!
-David
Details:
Theme: Kleo (Parent and Child) Latest version
WP: Latest Version
BP: Latest Version
Having the same issue and have reported it in Buddypress Trac, Buddypress Support forums (here) and discussed it at length with Seventh Queen (theme developer).
Tried it with all themes…parent, child, and default 2016. Problems exist in all themes
Turned off all plugins. Problem persists regardless.
Cleaned all caches, including host, and Cloudflare.
Can’t seem to find a solution. Any ideas?
Thanks.
HI @JeffWillia.ms-
Can you do the troubleshooting step requested above?
Thanks,
-David
Hi @dcavins
Sure thing. I copied and added the code from the Pastie link you provided, to the directory you specified.
Anything you need me to do to follow up?
Thanks!
Hi @dcavins
Following up after my last reply. I added your code to the specified directory. I receive this error in all my Buddypress interfaces (i.e. members, forums, etc.)
Parse error: syntax error, unexpected ‘<‘ in /home/swiftbus/public_html/5firemen.com/wp-content/plugins/buddypress/bp-groups/classes/class-bp-groups-member.php on line 1314
I just get a white screen with that error in it.
After deleting your code from the file directory above, the problem went away.
However, the original Groups Header issue still persists.
Hope that helps! 🙂
Hi @dcavins! 🙂
I get this, see the image attached, but this is the summary: it gets called twice and the result is bool(false)
.
http://imgur.com/a/tDmBr <– the screen capture in a group display page.
Thanks! 😉
Hi @jaumearagay & @JeffWillia.ms-
Thanks for posting the results of your testing. @jaumearagay, your results match what I expected. Can you try another test for me that checks the value after the foreach?
http://pastie.org/10964506
Thanks for your patience as we figure this one out.
-David
@dcavins
Last request only for @jaumearagay?
Thanks.
@jeffwilliams-1 Not at all! If you’re feeling like chasing it down, give it a try. When your code change last time failed, it was probably because somewhere along the line, a <
was encoded for the web as
& l t ;
so make sure that the changes to the file look visually like <?php
…
Thanks!
The code pasted from the page:
Administradores de grupo
$group_mods before foreach: bool(false)
$group_mods after foreach: array(1) {
[0]=>
object(stdClass)#5830 (1) {
["user_id"]=>
int(0)
}
}
[Here is the admin picture in the page]
$group_mods before foreach: bool(false)
$group_mods after foreach: array(1) {
[0]=>
object(stdClass)#5876 (1) {
["user_id"]=>
int(0)
}
}
Moderadores del Grupo
Sin mods
And the screen capture: http://imgur.com/a/E6R76
Thanks again for your help troubleshooting. Can you add a couple of debug statements to the function prime_group_admins_mods_cache()
in the same class? It looks like the cache item bp_group_mods
is not being set properly; I’m trying to understand why that would be.
Debug lines added here:
http://pastie.org/10965044#11,35
Thanks!
I can do it, for sure… But would you prefer an admin user to dive in it? The site is actually not open to the public, so we can tweak to our wish…
I’ll do this step you ask me to but if you’d better check it yourself, just ask! 😉
The code:
Administradores de grupo
$uncached group_ids: array(0) {
}
$group_mods before foreach: bool(false)
$group_mods after foreach: array(1) {
[0]=>
object(stdClass)#5830 (1) {
["user_id"]=>
int(0)
}
}
Foto del perfil de Matilde Rodríguez-Castellano
$uncached group_ids: array(0) {
}
$group_mods before foreach: bool(false)
$group_mods after foreach: array(1) {
[0]=>
object(stdClass)#5876 (1) {
["user_id"]=>
int(0)
}
}
Moderadores del Grupo
Sin mods
The screen capture: http://imgur.com/a/0H10D