Support » Plugin: Relevanssi - A Better Search » Catchable fatal error: Object of class stdClass could not be converted to string

  • Hi,

    Everytime I try to build an index, or continue building it, I get the error:

    Catchable fatal error: Object of class stdClass could not be converted to string in /home/xxx/domains/xxx.nl/public_html/wp-content/plugins/relevanssi/lib/common.php on line 396

    What could I be doing wrong? We did not modify any part of the plugin. Tried deleting and re-uploading it.

    https://wordpress.org/plugins/relevanssi/

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Mikko Saari

    (@msaari)

    There’s some bad data going through the process. Couple of things you can check:

    – Try disabling shortcode extension in Relevanssi settings.
    – Try disabling other plugins
    – Try one of the default themes

    I ran into this exact same issue myself recently. In my case, I tracked it down to having set Relevanssi to index all “visible” custom fields, and on my site, I was storing some serialized PHP objects in custom fields.

    This causes an issue because all custom field values are passed to relevanssi_tokenize, which only knows how to handle strings and arrays.

    This could either be fixed by updating the plugin to ignore custom field values that are objects, or to change which custom fields are being indexed.

    I wrote up a more detailed post about this here: http://jolekpress.com/php-catchable-fatal-error-object-of-class-could-not-be-converted-to-string/

    • This reply was modified 4 years, 1 month ago by JohnOlek.
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Catchable fatal error: Object of class stdClass could not be converted to string’ is closed to new replies.