• I have setup an search page for a client, but when a keyword brings up a page that has anything other than a string it shows the notice array to sting conversion.
    https://pastebin.com/eNM5cWSp
    On the results page i have excerpts and that is what causes the error. What can i do to maybe not shows the excerpts if the page excerpt is anything other than a string?

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

    (@msaari)

    That’s something to do with your custom fields. Looks like you may have some complicated array structures in your custom fields. Relevanssi should be able to handle simple arrays, but multilevel arrays may be problematic. Can you please show me an example of what kind of data you have in your custom fields?

    Relevanssi has a filter relevanssi_custom_field_value which filters the custom field values before Relevanssi does anything with them, so one solution is to add a filter that converts the complicated custom field data to something Relevanssi can handle. This same problem is likely happening in indexing, too, so a filter like that would help in indexing as well.

Viewing 1 replies (of 1 total)
  • The topic ‘Array to string conversion’ is closed to new replies.