We’re closing in on the problem, I think. One more debug addition, this time to bp-core/bp-core-cache.php
:
http://pastie.org/10965063#12-14
Thanks!
ADDITION means I leave the tweaked files in place and ADD this one? 😉
You can remove the other statements if you want. We know what they’re doing. 🙂
In the group page you get this output:
int(91) string(21) "bp_groups_memberships" object(stdClass)#5452 (12) { ["id"]=> string(2) "91" ["group_id"]=> string(2) "13" ["user_id"]=> string(1) "6" ["inviter_id"]=> string(1) "0" ["is_admin"]=> string(1) "0" ["is_mod"]=> string(1) "0" ["user_title"]=> string(0) "" ["date_modified"]=> string(19) "2016-09-15 11:37:10" ["comments"]=> string(0) "" ["is_confirmed"]=> string(1) "0" ["is_banned"]=> string(1) "0" ["invite_sent"]=> string(1) "0" } int(91) string(21) "bp_groups_memberships" object(stdClass)#5465 (12) { ["id"]=> string(2) "91" ["group_id"]=> string(2) "13" ["user_id"]=> string(1) "6" ["inviter_id"]=> string(1) "0" ["is_admin"]=> string(1) "0" ["is_mod"]=> string(1) "0" ["user_title"]=> string(0) "" ["date_modified"]=> string(19) "2016-09-15 11:37:10" ["comments"]=> string(0) "" ["is_confirmed"]=> string(1) "0" ["is_banned"]=> string(1) "0" ["invite_sent"]=> string(1) "0" } int(91) string(21) "bp_groups_memberships" object(stdClass)#5465 (12) { ["id"]=> string(2) "91" ["group_id"]=> string(2) "13" ["user_id"]=> string(1) "6" ["inviter_id"]=> string(1) "0" ["is_admin"]=> string(1) "0" ["is_mod"]=> string(1) "0" ["user_title"]=> string(0) "" ["date_modified"]=> string(19) "2016-09-15 11:37:10" ["comments"]=> string(0) "" ["is_confirmed"]=> string(1) "0" ["is_banned"]=> string(1) "0" ["invite_sent"]=> string(1) "0" } int(91) string(21) "bp_groups_memberships" object(stdClass)#5465 (12) { ["id"]=> string(2) "91" ["group_id"]=> string(2) "13" ["user_id"]=> string(1) "6" ["inviter_id"]=> string(1) "0" ["is_admin"]=> string(1) "0" ["is_mod"]=> string(1) "0" ["user_title"]=> string(0) "" ["date_modified"]=> string(19) "2016-09-15 11:37:10" ["comments"]=> string(0) "" ["is_confirmed"]=> string(1) "0" ["is_banned"]=> string(1) "0" ["invite_sent"]=> string(1) "0" } int(91) string(21) "bp_groups_memberships" object(stdClass)#5751 (12) { ["id"]=> string(2) "91" ["group_id"]=> string(2) "13" ["user_id"]=> string(1) "6" ["inviter_id"]=> string(1) "0" ["is_admin"]=> string(1) "0" ["is_mod"]=> string(1) "0" ["user_title"]=> string(0) "" ["date_modified"]=> string(19) "2016-09-15 11:37:10" ["comments"]=> string(0) "" ["is_confirmed"]=> string(1) "0" ["is_banned"]=> string(1) "0" ["invite_sent"]=> string(1) "0" } int(91) string(21) "bp_groups_memberships" object(stdClass)#5753 (12) { ["id"]=> string(2) "91" ["group_id"]=> string(2) "13" ["user_id"]=> string(1) "6" ["inviter_id"]=> string(1) "0" ["is_admin"]=> string(1) "0" ["is_mod"]=> string(1) "0" ["user_title"]=> string(0) "" ["date_modified"]=> string(19) "2016-09-15 11:37:10" ["comments"]=> string(0) "" ["is_confirmed"]=> string(1) "0" ["is_banned"]=> string(1) "0" ["invite_sent"]=> string(1) "0" } int(91) string(21) "bp_groups_memberships" object(stdClass)#5753 (12) { ["id"]=> string(2) "91" ["group_id"]=> string(2) "13" ["user_id"]=> string(1) "6" ["inviter_id"]=> string(1) "0" ["is_admin"]=> string(1) "0" ["is_mod"]=> string(1) "0" ["user_title"]=> string(0) "" ["date_modified"]=> string(19) "2016-09-15 11:37:10" ["comments"]=> string(0) "" ["is_confirmed"]=> string(1) "0" ["is_banned"]=> string(1) "0" ["invite_sent"]=> string(1) "0" } int(6) string(22) "bp_friends_friendships" object(stdClass)#5774 (6) { ["id"]=> string(1) "6" ["initiator_user_id"]=> string(1) "6" ["friend_user_id"]=> string(2) "36" ["is_confirmed"]=> string(1) "1" ["is_limited"]=> string(1) "0" ["date_created"]=> string(19) "2016-09-06 09:22:58" } int(1) string(22) "bp_friends_friendships" object(stdClass)#5775 (6) { ["id"]=> string(1) "1" ["initiator_user_id"]=> string(1) "6" ["friend_user_id"]=> string(1) "5" ["is_confirmed"]=> string(1) "1" ["is_limited"]=> string(1) "0" ["date_created"]=> string(19) "2016-08-22 10:25:37" } int(6) string(16) "bp_last_activity" array(3) { ["user_id"]=> string(1) "6" ["date_recorded"]=> string(19) "2016-11-18 20:15:56" ["activity_id"]=> string(1) "1" }
I’ve left the other file’s modified version active.
And this is what we get at the groups’ listing page before the first group:
http://pastie.org/10965263
I’ve tried to paste it directly here but the forum does not allow me to do it. Sorry for the long-line format! 😉
OK, maybe I could have administrator access to your site temporarily (or FTP access, whichever is easier for you)? You can find me on the buddypress channel in Slack, or email me at d_cavins76 [at] yahoo [dot] com.
And your nick in the channel? I can’t find you there…
My fault! I misspelled your name! I found you there! 😉
Hello All!
Some interesting news with this. Per suggestions in other forums (i.e. Buddy-Trac, etc.), they thought the issue might be related to my host’s caching, so I wrote Site Ground Support and asked them to check into the problem. Her reply is below:
“I was able to load the page in Mozilla and Safari with no resolving errors. However, once I opened it with Google Chrome, the error appear. I have cleared the application cache and deactivated plugins, however, to no avail. The issue is not server related it is an issue with the code”
After receiving her reply, I went and tested her findings for myself. Indeed, she was right. However, the investigation with different browsers must have caused a “break thru” with Chrome, because it no longer shows the error. This is true for multiple sites I manage that had the same issue.
Not sure why that solved the problem, but thought I’d let you guys know about it.
Thanks for taking the time to help.
Cheers.
Hi, sorry i have the same problem, i try to fix without success
Somebody can give me the solution?
Thanks a lot
Has anyone made progress or presented a workable solution for this?
Having the same issue myself, all software at current versions.
Hi @jmichaelp
No, we’ve not solved it, because most of us can’t recreate the issue. If you are comfortable doing some troubleshooting, please run the various var_dump
s and tracing code I’ve added further on up in this thread and let me know what you find. Or, grant me administrator access to your site via FTP for a short time when I’m able to dig into it myself.
Thanks! We’d love to have access to a broken site to see what’s up.
-David
Same problem on my site. Running theme Boss 2.3 from BuddyBoss.
Please write PM if you need access to a broken site.
Best regards,
Michael
This error is showing up to many websites. A google search for “PHP Warning: Creating default object from empty value in /wp-content/plugins/buddypress/bp-groups/classes/class-bp-groups-member.php on line 1170” returns almost 5500 results…
And if you search for “PHP Warning: Creating default object from empty value in class-bp-groups-member.php on line” (removing line number and the path of the file from the results, you get some something like 337000 results.
My site is also showing this message, and I already removed all plugins and themes, running the latest version of WP, BP and BBPress with Twenty Seventeen template.
I guess it may be a problem with php, or maybe with chrome and chromium… Maybe it is time to start working on this issue.
I already added the following in my functions.php:
/* Remove errors if any */
error_reporting(E_ERROR | E_PARSE);
/* End remove Errors */
it’s not the ideal. there is also the better option to add some lines in your wp-config.php, to do a proper debug and get it in a log file, instead of showing it in the site.
Hi @lawlyet
If you’re up for helping to root out this problem, please add this debugging info as mentioned above:
We’re closing in on the problem, I think. One more debug addition, this time to bp-core/bp-core-cache.php:
http://pastie.org/10965063#12-14
Pastie is broken at the moment, but hopefully it’ll be back up soon.
Thanks for you help with this!
-David
has someone have answered this problem already??? i have the same error.
i just add this to my function.php for temporary solution.
/* Remove errors if any */
error_reporting(E_ERROR | E_PARSE);
/* End remove Errors */
Same problem here.
I use the code suggested above. However, the code conflict to another plugin Paid Membership Pro. ><
It will not allow discount code entering in Paid Membership Pro.
I think I finally understand what is going wrong here. If you pass a bad group object to bp_group_has_moderators()
or don’t pass a group object and the global $groups_template->group
isn’t set, this error can occur.
If you’ve had this problem, can you please respond telling me what theme you’re using? Furthermore, look in your theme where bp_group_has_moderators()
is called, and tell me if it’s being called with a $group
argument (like bp_group_has_moderators( $group_object )
) or without an argument (like bp_group_has_moderators()
).
Do you also see an entry in your error log like the following or not?
Trying to get property of non-object in /Users/dcavins/Sites/develop.git.wordpress.org/src/wp-content/plugins/buddypress/src/bp-groups/bp-groups-template.php on line 2576
Thanks for your help,
-David