Can’t save posts in Gutenberg with Defender activated

I can’t save posts using Gutenberg while Defender is activated when I try to save, it shows the following error: “Updating failed. Error message: The response is not a valid JSON response.”

I also have another issue with Defender, I can’t remove one of the security tweaks “Prevent PHP execution” even after implementing the PHP execution code in Nginx config.

  • Predrag Dubajic
    • Support

    Hi Richard,

    I have reived the chat and from what I understand the JSON error was happening even with Defender disabled?
    Can you check if any of the solutions mentioned here (except for Classic Editor) work for you:
    https://passionwp.com/response-is-not-a-valid-json-response-error/

    I also have another issue with Defender, I can’t remove one of the security tweaks “Prevent PHP execution” even after implementing the PHP execution code in Nginx config.

    I’ve tried accessing one of the PHP files directly from browser while it should be showing forbidden or 404 error, this suggests that the rules aren’t working so Defender is still reporting it.
    Can you double-check if the code is added to the proper place or have your hosting provider have a look at this and see why might such rules not be working properly?

    Best regards,
    Predrag