Support » Plugin: Jetpack - WP Security, Backup, Speed, & Growth » Json_decode() expects paramater 1 to be string

  • Resolved ACEkin

    (@acekin)


    I started having this problem today I believe. On top of the JetPack Stats display there is an error message like the one below. I removed the account and domain info:

    json_decode() expects parameter 1 to be string, array given in /home/account/public_html/subfolder/wp-content/plugins/jetpack/_inc/lib/admin-pages/class.jetpack-admin-page.php on line 163

    I disabled JetPack and re enabled it, but had difficulty connecting to WordPress.com. It turned out that my ISP tech support added a code segment in htaccess file to block what they thought to be an attack. After I removed the code segment that denied access to xmlrpc.php from any IP but my own, I was able to connect to WordPress.com. However the json_decode() error remains. I had written a support e-mail and after connecting to WordPress.com I thought all was good and reported that my earlier email could be ignored. However, I am still getting that error, and I am not sure if it is cosmetic, functional, critical, accidental, intentional, ….

    By the way, when I disabled JetPack the site performance improved markedly with much faster load times. I have it active now and I can notice the slight delay in loading content, and slightly slower load times for Dashboard pages.

    I will greatly appreciate some insight and ways to fix it.

    Thanks,

    Cemal

    • This topic was modified 4 years, 5 months ago by ACEkin.
Viewing 15 replies - 1 through 15 (of 21 total)
  • i have nearly the same issue..

    Warning: json_decode() expects parameter 1 to be string, array given in /home2/account/public_html/domain.com/wp-content/plugins/jetpack/_inc/lib/admin-pages/class.jetpack-admin-page.php on line 163

    Warning: Cannot modify header information – headers already sent by (output started at /home2/account/public_html/domain.com/wp-content/plugins/jetpack/_inc/lib/admin-pages/class.jetpack-admin-page.php:163) in /home2/account/public_html/domain.com/wp-includes/pluggable.php on line 1174

    Yep, I started getting two of these each time I enter the Dashboard after updated to Jetpack 4.4:

    [22-Nov-2016 00:11:38 America/Chicago] PHP Warning: json_decode() expects parameter 1 to be string, array given in /(** removed **)/wp-content/plugins/jetpack/_inc/lib/admin-pages/class.jetpack-admin-page.php on line 163

    Same here, hope for a fix soon as I can’t even add widgets thanks to this error

    I have exactly the same error after updating the plugin

    Plugin Author Jeremy Herve

    (@jeherve)

    Jetpack Mechanic 🚀

    Thank you all for the reports! We’re working on getting this fixed, and will release a new version of Jetpack to solve that issue later today.

    If you’d like, you can apply the following patch to your own installation of Jetpack right now to solve the issue:
    https://github.com/Automattic/jetpack/pull/5735/files

    Another alternative would be to edit your site’s wp-config.php file, and make sure WP_DEBUG is set to false.

    I hope this helps.

    waiting for next update, i have same error.

    Same here.

    • This reply was modified 4 years, 5 months ago by airliajsmith.

    Having the same problem here.

    I tried the fix that @jeherve posted and it fixed the PHP Warning, but I’m still getting the cURL error:

    cURL error 28: Operation timed out after 30 seconds with 0 bytes received

    Plugin Author Jeremy Herve

    (@jeherve)

    Jetpack Mechanic 🚀

    @caci That’s a different issue I’m afraid. Can you please use Jetpack’s Debugger module to send us some more information about your site?

    1. Go to the Jetpack page in your dashboard.
    2. Click on the Debug link appearing at the bottom of the page.
    3. Click the link that says “click here to contact Jetpack support.”
    4. Fill in the description box and your name and email address.
    5. Click the “Contact Support” button to send us the debug results privately. It’s best not to post this information on public forums, as it contains private details about your site.

    Thanks!

    Thanks @jeherve

    I will do that.

    Client’s site already has WP_DEBUG set to false, but still seeing this error when trying to connect Jetpack as well regardless. Patch appears to work though.

    Plugin Author Jeremy Herve

    (@jeherve)

    Jetpack Mechanic 🚀

    We’ve now released Jetpack 4.4.1 to solve this issue. Let me know if you still experience issues after updating!

    Thread Starter ACEkin

    (@acekin)

    Thank you Jeremy, the error message disappeared from the top of the stats bars. Can something be done about the speed impact of JetPack on page and dashboard load? When it is deactivated there is a noticeable load time improvement and I do not have many features enabled.

    Thanks again,

    Cemal

    That seems to have fixed the warning message in the PHP error_log. BTW, I did not have WB_DEBUG defined one way or another.

    Plugin Author Jeremy Herve

    (@jeherve)

    Jetpack Mechanic 🚀

    Can something be done about the speed impact of JetPack on page and dashboard load?

    Thanks for the feedback!

    Stats are most likely what’s having the biggest impact on your dashboard’s loading time, as we make extra requests when you’re logged in to see if your views should be included in Stats.

    We’re working on that, as well as on other performance improvements for Jetpack. You can check our work on this here.

Viewing 15 replies - 1 through 15 (of 21 total)
  • The topic ‘Json_decode() expects paramater 1 to be string’ is closed to new replies.