• While I’m not very tech savvy when it comes to WordPress, I at least have found my way to understand how to turn on and access my debug.log in WordPress. ?? There I recently just discovered a single warning that showed up yesterday in my log that I originally emailed to my connection at plugin Jetpack to ask them if they knew what it meant. This is what I got from them.

    >Hi Andrew,
    >
    >PHP Warning: trim() expects parameter 1 to be string, array given in /home/content/—>——–/html/wp-includes/class-wp-query.php on line 755
    >
    >This is caused by a plugin that’s using a specific query to change the way posts are >displayed on some pages of your site. My guess would be that this is caused by the >Relevanssi plugin on your site; it makes changes to the way posts are sorted on search >result pages and that may at times cause issues.
    >
    >I would recommend that you get in touch with the plugin author and let them know you >ran into this issue; they should be able to help you investigate further.
    >Before you contact them, however, you can try to confirm that it is indeed caused by >issues on search result pages by trying to make a search on a page when Relevanssi is >used, and see if more warnings pop up on your error log.

    I have been using your plugin with great success and had no issues ever that I am aware of. I just happened to notice this issue show up with a warning in my debug.log today. It’s the first time it happened since turning on my debug.log a couple of months ago and am not sure what it means. I use the default WordPress search widget that’s tied to the front it and Relevannsi to the back end. I have not changed any of the defaults to Relevannsi since starting to use it years ago. I love the plugin and just wanted to pass this on to see if you know what it might be. There are no other search strings on my site and the only other data entry on my site is to sign up for an email subscription. I have a very basic site. Let me know if you have any idea on this?

    Sincerely, and thanks for any help you may be able to offer on this,
    Andrew

    The page I need help with: [log in to see the link]

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

    (@msaari)

    That error message doesn’t mean much. Something in WP is getting bad data, but it doesn’t tell where that bad data is coming. Sure, it might be Relevanssi, but then again, might not.

    Have you done as the Jetpack folks suggested? Did you do more Relevanssi searches to see if more errors crop up in the log? If you haven’t, please do so.

    If each search adds a new error in the log, then yes, the problem is related to search. If that’s the case, the next step is to disable Relevanssi and do more searches to see if the errors cease or if they still show up.

    Once you’ve done this, please report the results.

    Thread Starter Andrew Arthur Dawson

    (@andrewarthurdawson)

    I have tried a number of searches, but none have caused the error again thus far. Any suggestions of search strings to try that might trigger this? I was just putting in random stuff from symbols to letters to numbers to various combinations. Always got back either no results or a result or two. I have a pretty basic site and very limited plugins and have no other ideas of what else could cause this to suddenly show up once. If you have any suggestions of specific combinations of things to try to search for that could cause this please let me know or any other ideas either? As I mentioned, I’m a pretty basic user with very little WordPress understanding other than now to point and click really.

    Plugin Author Mikko Saari

    (@msaari)

    The error is not related to a particular search string. If the error doesn’t show up when you do a search, then it’s probably not caused by the search – otherwise it would occur every time you do a search.

    If it happens rarely, it’s probably best to not care about it. It’s not significant, and not worth spending your time investigating it.

    If you start seeing the warning a lot in your logs, then it’s worth investigating, but it will require more information – just that error message alone is not enough to figure out what’s up with that.

    Thread Starter Andrew Arthur Dawson

    (@andrewarthurdawson)

    Ok thank you. I’ll keep an eye on it. I wish I understood those debug warning messages better but you are probably right that if it happens rarely it’s not worth being concerned about. I have been trying to chase down another issue of my site having resource timeouts and that’s why I’ve had this debug log on. And any message that has appeared I’ve wondered if it could be related. At least in this case I know it’s not. I only wish I knew what triggered it because it’s the first message that’s appeared that I haven’t been able to figure out that.

    Plugin Author Mikko Saari

    (@msaari)

    If you want to monitor what happens on your site, install Query Monitor. It will show you when there are warnings and errors. That way you’ll know immediately when something you do on your site causes something alarming, so you don’t have to guess what caused the error – you’ll know, and Query Monitor will give you more information of the context.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘PHP Warning, expects parameter 1 to be string’ is closed to new replies.