Articles in this section

Wordpress notifications are received: Failed to reset cache for the instance #902: An error has occurred when decoding JSON: Decoding failed: Syntax error

Plesk for Linux kb: technical ext: wptk

Applicable to:

  • Plesk for Linux

Symptoms

    • WordPress email notifications are received by Plesk admin. A similar error can be found in /var/log/plesk/panel.log when clicking on Plesk > Wordpress > example.com > Refresh.

      CONFIG_TEXT: Website Example (https://example.com): Failed to reset cache for the instance #902: An error has occurred when decoding JSON: Decoding failed: Syntax error

    • Cloning a WordPress using WP Toolkit fails with the error:

      CONFIG_TEXT: Failed to reset cache for the instance #902: An error has occurred when decoding JSON: Decoding failed: Syntax error

      CONFIG_TEXT: Selected items were updated with errors:
      * Unable to update plugin 'elementor', details: The plugin(elementor) has not been updated due to unrecognized reason

    • Attempt to get theme/plugin list will print PHP code instead of JSON list of themes:

      # plesk ext wp-toolkit --wp-cli -instance-id 902 -- theme list --fields=name --format=json --quiet --skip-themes=false | head


      # plesk ext wp-toolkit --wp-cli -instance-id 902 -- plugin list --fields=name --format=json --quiet --skip-plugins=false | head

  • Here is how to confirm the issue is not caused by WPTK from Plesk and by plugin/theme:

LINUX:
  1. Change current dir to website document root:

    # cd /var/www/vhosts/example.com/httpdocs/

  2. Download official WP-CLI from Wordpress: https://wp-cli.org/#installing

  3. Run command on behalf of system user and using PHP version from domain use "theme list" or "plugin list" depending on what you want to check:

    # sudo -u example /opt/plesk/php/7.4/bin/php ./wp-cli.phar theme list --fields=name --format=json

  4. If any html code output except JSON body like below returned this means you have buggy plugin/theme:

    CONFIG_TEXT: [{"name":"flatsome"},{"name":"twentytwenty"}]

WINDOWS:
  1. Download to website document root wp-cli.phar https://wp-cli.org/#installing

  2. In CMD switch to website document root:

    C:\> cd C:\inetpub\vhosts\example.com\httpdocs\

  3. Run command to get plugin/theme list:

    C:\> "C:\Program Files (x86)\Plesk\Additional\PleskPHP73\php.exe" wp-cli.phar plugin list --fields=name --format=json

  4. If any html code output except JSON body like below returned this means you have buggy plugin/theme:

    C:\> [{"name":"flatsome"},{"name":"twentytwenty"}]

Cause

Plugin or theme are not compatible with wp-cli.

Resolution

Contact the plugin or theme developers for assistance.

Note: in case the Elementor plugin is in use or Elementor-related errors in logs, refer to this article.

Was this article helpful?

Comments

1 comment
Date Votes
  • Seems a lot of customers are getting this recently.... panel.log is swamped with these messages.

    0

Please sign in to leave a comment.