slaFFik / bp-feeds

BuddyPress Feeds - Allow your members to import (RSS) feeds of their external blogs into Activity Directory
GNU General Public License v3.0
7 stars 2 forks source link

Fatal Error on user registration when plugin is active #15

Closed BoweFrankema closed 8 years ago

BoweFrankema commented 10 years ago

When a user registers the following fatal error occurs

"Fatal error: Cannot use object of type WP_User as array in /Users/Bowromir/webserver/cfcommunity.net/wp-content/plugins/buddypress-rss-feeds/core/front_members.php on line 222"

slaFFik commented 9 years ago

Unfortunately, I can't replicate. Are there any details regarding this issue?

BoweFrankema commented 9 years ago

I need to test this again.. I did a poor job describing this error :-)

BoweFrankema commented 9 years ago

Ok this started happening again. You can reproduce this by going here:

http://cfcommunity.net/become-a-member/

And filling in the registration form. It will give the fatal error after registration.

"Fatal error: Cannot use object of type WP_User as array in /srv/users/serverpilot/apps/cfcommunity/public/wp-content/plugins/buddypress-rss-feeds/core/front_members.php on line 227"

The reason I could not reproduce this before is because I was registering my account through a subsite in the network and BuddyPress RSS Feeds was not active there.

slaFFik commented 9 years ago

@BoweFrankema I can't replicate. Can you please test this one more time and provide some feedback? That error message is not valid any more, on that line another code is currently located.

BoweFrankema commented 9 years ago

Let me pull in the latest changes again

BoweFrankema commented 9 years ago

Here we are again.. :-) The error is still present when you use register a new user account and the plugin is active. I'm not sure why or how but I think it has something to do with the action firing and trying to update the user meta before that data is present.

"Fatal error: Cannot use object of type WP_User as array in /Users/Bowromir/webserver/wefoster.co/wp-content/plugins/buddypress-rss-feeds/core/front_members.php on line 255"

https://github.com/WeFoster/buddypress-rss-feeds/blob/master/core/front_members.php#L255

This scenario might only happen when registration is done through another plugin. In my case this is gravity forms. I think this is the registration hook that is used:

https://www.gravityhelp.com/documentation/article/gform_user_registered/

slaFFik commented 9 years ago

Thanks for the update! Will take care of this asap. 28 июля 2015 г. 16:18 пользователь "Bowe Frankema" notifications@github.com написал:

Reopened #15 https://github.com/WeFoster/buddypress-rss-feeds/issues/15.

— Reply to this email directly or view it on GitHub https://github.com/WeFoster/buddypress-rss-feeds/issues/15#event-367209948 .