• Hello fellow WP-users (and experts).

    I have the following setup:
    Multisite on WP, using Gutenberg
    running on a localhost (Ubuntu LAMPP, PHP 7.2.32)

    I am running KadenceBlocks and theme, and the issue might be related to it. But since (from my research) the JSON-error is often related to Gutenberg, I hope to gather information here, as how to proceed/troubleshoot.

    I can replicate the error:
    If I create a new page, “save draft” will work, until I add a block called “Posts”. Then “save draft” will fail, with the following error message:
    Updating failed. The response is not a valid JSON response.

      I did some research all over the place:

    Rest API issues were mentioned, but no such error under “site health”

    Site health mentions
    -No HTTPS (currently OK for me, as it’s local development)
    -imagick not installed/or disabled (not sure that it ever was there)

    Did enable Debug and logging in wp-config.php, then restarted server

    define( ‘WP_DEBUG’, true );
    /* Enable Debug logging to the /wp-content/debug.log file */
    define( ‘WP_DEBUG_LOG’, true );

    JSON-Error was reproduced, as mentioned above, but no log file in wp-content folder to find.
    ——————-

    Often, posts mention issues with permalinks. I did switch my permalinks back and forth, just to be sure. Did not affect the issue at all.

    .htaccess as a possible problem causer is mentioned, but it’s not been modified by me recently, and I don’t know what to look for.
    File-Permissions are “-rw-r–r–“, and the content is like this:

    php_value memory_limit 256M
    php_value max_input_vars 10000
    
    # BEGIN WordPress
    RewriteEngine On
    RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
    RewriteBase /
    RewriteRule ^index\.php$ - [L]
    
    # add a trailing slash to /wp-admin
    RewriteRule ^([_0-9a-zA-Z-]+/)?wp-admin$ $1wp-admin/ [R=301,L]
    
    RewriteCond %{REQUEST_FILENAME} -f [OR]
    RewriteCond %{REQUEST_FILENAME} -d
    RewriteRule ^ - [L]
    RewriteRule ^([_0-9a-zA-Z-]+/)?(wp-(content|admin|includes).*) $2 [L]
    RewriteRule ^([_0-9a-zA-Z-]+/)?(.*\.php)$ $2 [L]
    RewriteRule . index.php [L]
    # END WordPress

    Tried the following:
    MySite.local/wp-json
    The result is, that I get all kinds of data on the screen. Seems to be working.

    Anybody any ideas? Can anybody lead me in the right direction?

    Below I will post the site health info:

    
    ### wp-core ###
    
    version: 5.8.1
    site_language: en_US
    user_language: en_US
    timezone: America/Chicago
    permalink: /%category%/%postname%/
    https_status: false
    multisite: true
    user_registration: false
    blog_public: 1
    default_comment_status: open
    environment_type: production
    user_count: 1
    site_count: 2
    network_count: 1
    dotorg_communication: true
    
    ### wp-active-theme ###
    
    name: Kadence (kadence)
    version: 1.1.8
    author: Kadence WP
    author_website: https://www.kadencewp.com/
    parent_theme: none
    theme_features: core-block-patterns, widgets-block-editor, automatic-feed-links, title-tag, html5, custom-units, custom-line-height, customize-selective-refresh-widgets, responsive-embeds, post-thumbnails, editor-styles, align-wide, editor-font-sizes, amp, menus, custom-logo, editor-color-palette, editor-style, widgets
    theme_path: /home/webdesign/websites/Sitename.com/wordpress/wp-content/themes/kadence
    auto_update: Disabled
    
    ### wp-themes-inactive (3) ###
    
    Astra: version: 3.7.3, author: Brainstorm Force (latest version: 3.7.4), Auto-updates disabled
    Twenty Twenty: version: 1.8, author: the WordPress team, Auto-updates disabled
    Twenty Twenty-One: version: 1.4, author: the WordPress team, Auto-updates disabled
    
    ### wp-plugins-active (3) ###
    
    Kadence Blocks – Gutenberg Blocks for Page Builder Features: version: 2.1.15, author: Kadence WP, Auto-updates disabled
    Kadence Starter Templates: version: 1.2.7, author: Kadence WP, Auto-updates disabled
    NextGEN Gallery: version: 3.17, author: Imagely, Auto-updates disabled
    
    ### wp-plugins-inactive (13) ###
    
    Akismet Anti-Spam: version: 4.2.1, author: Automattic, Auto-updates disabled
    Antispam Bee: version: 2.10.0, author: pluginkollektiv, Auto-updates disabled
    Better Search Replace: version: 1.3.4, author: Delicious Brains, Auto-updates disabled
    Duplicator: version: 1.4.3, author: Snap Creek, Auto-updates disabled
    FooGallery: version: 2.1.18, author: FooPlugins, Auto-updates disabled
    Multisite Language Switcher: version: 2.4.12, author: Dennis Ploetner, Auto-updates disabled
    Pods - Custom Content Types and Fields: version: 2.8.1, author: Pods Framework Team (latest version: 2.8.3), Auto-updates disabled
    Qubely - Advanced Gutenberg Blocks: version: 1.7.2, author: Themeum.com, Auto-updates disabled
    Starter Templates: version: 2.7.3, author: Brainstorm Force (latest version: 2.7.5), Auto-updates disabled
    Ultimate Blocks: version: 2.4.9, author: Ultimate Blocks, Auto-updates disabled
    WP Mail SMTP: version: 3.1.0, author: WPForms, Auto-updates disabled
    WP Migrate DB: version: 2.2.0, author: Delicious Brains, Auto-updates disabled
    Yoast Duplicate Post: version: 4.1.2, author: Enrico Battocchi & Team Yoast, Auto-updates disabled
    
    ### wp-media ###
    
    image_editor: WP_Image_Editor_GD
    imagick_module_version: Not available
    imagemagick_version: Not available
    imagick_version: Not available
    file_uploads: File uploads is turned off
    post_max_size: 40M
    upload_max_filesize: 40M
    max_effective_size: 40 MB
    max_file_uploads: 20
    gd_version: bundled (2.1.0 compatible)
    gd_formats: GIF, JPEG, PNG, BMP
    ghostscript_version: 9.50
    
    ### wp-server ###
    
    server_architecture: Linux 5.11.0-27-generic x86_64
    httpd_software: Apache/2.4.43 (Unix) OpenSSL/1.1.1g PHP/7.2.32 mod_perl/2.0.11 Perl/v5.32.0
    php_version: 7.2.32 64bit
    php_sapi: apache2handler
    max_input_variables: 10000
    time_limit: 120
    memory_limit: 256M
    max_input_time: 60
    upload_max_filesize: 40M
    php_post_max_size: 40M
    curl_version: 7.53.1 OpenSSL/1.1.1g
    suhosin: false
    imagick_availability: false
    pretty_permalinks: true
    htaccess_extra_rules: true
    
    ### wp-database ###
    
    extension: mysqli
    server_version: 10.4.13-MariaDB
    client_version: mysqlnd 5.0.12-dev - 20150407 - $Id: 3591daad22de08524295e1bd073aceeff11e6579 $
    
    ### wp-constants ###
    
    WP_HOME: undefined
    WP_SITEURL: undefined
    WP_CONTENT_DIR: /home/webdesign/websites/Sitename.com/wordpress/wp-content
    WP_PLUGIN_DIR: /home/webdesign/websites/Sitename.com/wordpress/wp-content/plugins
    WP_MEMORY_LIMIT: 64M
    WP_MAX_MEMORY_LIMIT: 256M
    WP_DEBUG: true
    WP_DEBUG_DISPLAY: true
    WP_DEBUG_LOG: true
    SCRIPT_DEBUG: false
    WP_CACHE: false
    CONCATENATE_SCRIPTS: undefined
    COMPRESS_SCRIPTS: undefined
    COMPRESS_CSS: undefined
    WP_LOCAL_DEV: undefined
    DB_CHARSET: utf8mb4
    DB_COLLATE: undefined
    
    ### wp-filesystem ###
    
    wordpress: writable
    wp-content: writable
    uploads: writable
    plugins: writable
    themes: writable
    mu-plugins: writable
    
Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter bestcases

    (@bestcases)

    Update: I did upgrade the LAMPP on my Ubuntu system to have a more current PHP-Version. Just in case.

    Am now running PHP 7.4.25

    Unfortunately, the issue remains.

    Thread Starter bestcases

    (@bestcases)

    Maybe the following will help evaluating the problem:

    I did create two new test-pages in WP. One without the error causing element, and one with. I did try to save both, and did log the attempts, using the Browser’s Developer-Tools with the “network” tab.

      The below snapshots have been done like this:

    Went to the Dashboard, Pages, then did click on “new page”. After everything was loaded, I did clear everything in the console “network”. Everything you see, in the code below happened from there.

      I did two tests:

    1st: Typed a heading, saved draft. Without error.
    2nd: Typed a heading + inserted a Posts-Block, saved draft. JSON-error, as expected.

    The resulting log of both tests (the content of the “network tab”) is linked below:
    File without error causing block here.
    File with error causing block here.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘JSON troubleshooting (Multisite)’ is closed to new replies.