Skip to:
Content

BuddyPress.org

Opened 7 years ago

Closed 7 years ago

Last modified 7 years ago

#7678 closed defect (bug) (worksforme)

Getting Catchable fatal error

Reported by: opie2k1's profile opie2k1 Owned by:
Milestone: Priority: normal
Severity: major Version: 2.9.2
Component: Extended Profile Keywords: reporter-feedback
Cc:

Description

I am trying to use the plugin BuddyPress Default Data and am getting the error:

Catchable fatal error: Object of class WP_Error could not be converted to string in /home/dh_ebc578/thisismytestsite.xyz/wp-content/plugins/buddypress/bp-xprofile/classes/class-bp-xprofile-profiledata.php on line 127

The plugin author said this is a buddypress issue, not a plugin issue. Can you please help?

Thanks!
Shawn

Change History (6)

#1 @boonebgorges
7 years ago

  • Component changed from Core to Extended Profile
  • Keywords reporter-feedback added

Is it possible for you to provide a more complete stack trace? I'm guessing that the $this->user_id parameter is the WP_Error object https://buddypress.trac.wordpress.org/browser/tags/2.9.2/src/bp-xprofile/classes/class-bp-xprofile-profiledata.php#L127; this might result in the Default Data plugin because it attempted to generate a user, but failed, and didn't catch its failure before attempting to add profile data for the new user.

We could build some sort of failsafe to prevent this sort of fatal from happening, but I don't know if we'd want to. In this case, it's likely that the problem is a result of some incorrect logic or incomplete error checking in BP Default Data, and if we were to silently "fix" the error (by returning false or something) it would hide what could be a more serious bug for the plugin.

#2 @opie2k1
7 years ago

Thanks for getting back to me. I'll pass this on to the developer and see if he can fix it. I appreciate the help!

#3 @DJPaul
7 years ago

  • Milestone changed from Awaiting Review to Under Consideration

#4 @DJPaul
7 years ago

Slava, have you recreated this problem locally and seen the complete stack trace?

#5 @DJPaul
7 years ago

  • Milestone Under Consideration deleted
  • Resolution set to worksforme
  • Status changed from new to closed

I suspect this is a lack of handling in the third-party plugin. Closing until such time proven otherwise.

#6 in reply to: ↑ description @mdiazf80
7 years ago

The same happened to me. But I don't know if for the same reason. In my case, the error you report started appearing from the second crash. I solved it by manually erasing all the data the plugin had created before crashing. Also, in .htaccess located in \htdocs\wordpress, I added the line:

php_value max_execution_time 600

This prevents the first crash from happening, which was due to excessive time of execution.

Hope it helps. Cheers,

Note: See TracTickets for help on using tickets.