• Resolved aquandt44

    (@aquandt44)


    When I try to update a page with a spacer, I get the error:
    Updating failed. The response is not a valid JSON response.

    However this error is not occurring on my local machine or the Dev environment. The issue happens on both QA and Production.

    I have updated to the latest version of WordPress and plugins, disabled all plugins, disabled individual plugins. When I edit existing or create new pages without spacers the page gets updated. The issue only occurs when I put a spacer in the page. If I edit the spacer and remove the ‘style=”xxxx”‘ tag, I am able to submit the form.

    
    <!-- wp:spacer {"height":"5px"} -->
    <div style="height:5px" aria-hidden="true" class="wp-block-spacer"></div>
    <!-- /wp:spacer -->
    

    I am not sure why the style="height:5px" is breaking pages but only on QA and Prod environments and not on Dev or my localhost.

    Thank in advance for your help.

Viewing 7 replies - 1 through 7 (of 7 total)
  • What is your browser console log showing you?

    Thread Starter aquandt44

    (@aquandt44)

    During the Post call, I get a 403 Forbidden that is erroring out in: raven.js line 1252.

    Picture of the error
    https://pasteboard.co/vzkmliwMt7lv.png

    Thread Starter aquandt44

    (@aquandt44)

    I inspected the args variable, and the Body is the same in Dev (working) and QA (erroring)

    My guess is it is likely to be security on your QA / Prod host, e.g. modsecurity not liking the payload.

    Get your host or server admin to inspect the security logs and if necessary whitelist whatever is triggering it.

    Thread Starter aquandt44

    (@aquandt44)

    But I am able to post if I dont use the spacer. So your guess is that something is blocking just the style tag?

    Yes, I’m not sure what your server security is, but tools like modsecurity have pattern matching rules that are used in malicious payloads and it maybe just the style coupled with some other text items triggers a rule.

    Whilst I have never seen this particular issue I have encountered rules being tripped in other innocent scenarios.

    As you have disabled plugins etc etc the only real difference is the server tech environment and any edge security ( if you running nay off server security like cloudflare )

    Thread Starter aquandt44

    (@aquandt44)

    Thanks for your help, The issue for me was with AWS when we implemented WAF on our QA and Production sites.

    Had to adjust the rules so the devs were not being auto blocked by the WAF

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Updating failed. Not a valid JSON response. When using Spacers in Production’ is closed to new replies.