Seeing “The response is not a valid JSON response” when you save or update an event in the block editor? That message means WordPress expected JSON from the REST API but got something else (HTML, a firewall page, a PHP warning, or nothing). Follow this checklist aimed specifically at The Events Calendar to diagnose and fix it fast.
When I try to save an event with the block editor in The Events Calendar, I get: “The response is not a valid JSON response.” How do I fix this?
The block editor saves content over the WordPress REST API. If the endpoint for events (/wp-json/wp/v2/tribe_events/<id>) is blocked, redirected, cached incorrectly, or outputs non-JSON (e.g., a PHP warning or HTML login/firewall page), WordPress throws this error.
curl -I -L https://example.com/wp-json/
Expect HTTP/1.1 200 and content-type: application/json. If you get HTML, a 301/302 chain, or 403/404, something is intercepting requests.
curl -I -L "https://example.com/wp-json/wp/v2/tribe_events?per_page=1"
Again expect a 200 JSON response. Any redirect/403/HTML indicates the problem.
.htaccess (put this in the site root, replacing conflicting rules):# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# END WordPress
Tip: If you have global redirects, bypass them for the REST API so it can return JSON:
# Place before other redirect rules
RewriteRule ^wp-json/?$ - [L]
RewriteRule ^wp-json/ - [L]
Nginx snippet (inside the server block):
location / {
try_files $uri $uri/ /index.php?$args;
}
location ~ ^/wp-json/ {
try_files $uri $uri/ /index.php?$args;
}
/wp-json/* and /wp-json/wp/v2/tribe_events*./wp-json or admin cookies. Many “invalid JSON” cases are a WAF returning an HTML challenge page to the editor./wp-json/*. Cached HTML will break JSON parsing.www/non-www).Full (Strict) SSL where applicable and avoid mixed content or forced HTTP→HTTPS redirects that affect /wp-json.Quick checks:
# Both should return 200 with JSON (no HTML)
curl -I -L https://example.com/wp-json/
curl -I -L https://www.example.com/wp-json/
/* wp-config.php */
define('WP_DEBUG', false);
define('WP_DEBUG_DISPLAY', false);
define('WP_DEBUG_LOG', true);
<?php. Even a single space sent before JSON corrupts responses./wp-json/*./wp-json/* or remove Basic Auth./wp-json/wp/v2/tribe_events* (editor save) and /wp-json/tribe/events/v1/* (plugin’s public API)./* php.ini or .user.ini */
max_execution_time = 120
memory_limit = 256M
https://example.com/wp-json/ returns 200 with JSON headers (no redirects/HTML).https://example.com/wp-json/wp/v2/tribe_events?per_page=1 returns 200 JSON./wp-json/* bypasses WAF/caching/redirect rules.Capture failing responses with your browser’s Network tab while saving an event. Look at the failing /wp-json/wp/v2/tribe_events/ID request, its Status, Response (HTML? JSON?), and Headers will point to the exact blocker.
WP Assistant is a free tool created by Atiba Software, a WordPress design and development company located in Nashville, TN. If you need more personalized WordPress assistance let us know, and we’ll get back to you ASAP!