5.4 JS Errors When Deferring JS
-
After upgrading to 5.4 all of our sites with WP-Rocket JS deferred optimization in place are displaying JS console errors. Reverting back to 5.3 resolves the issue.
Does anyone have a fix for this issue besides not deferring JS?
Uncaught TypeError: Cannot read property ‘use’ of undefined:
wp.apiFetch.use( wp.apiFetch.createRootURLMiddleware( “https://www.domainremoved.com/wp-json/” ) );refill 404 error:
api-fetch.min.js?ver=4dec825c071b87c57f687eb90f7c23c3:2 GET /contact/contact-form-7/v1/contact-forms/4296/refill?_locale=user 404Invalid JSON error:
{code: “invalid_json”, message: “The response is not a valid JSON response.”}code: “invalid_json”message: “The response is not a valid JSON response.”__proto__: constructor: ƒ Object()hasOwnProperty: ƒ hasOwnProperty()isPrototypeOf: ƒ isPrototypeOf()propertyIsEnumerable: ƒ propertyIsEnumerable()toLocaleString: ƒ toLocaleString()toString: ƒ toString()valueOf: ƒ valueOf()__defineGetter__: ƒ __defineGetter__()__defineSetter__: ƒ __defineSetter__()__lookupGetter__: ƒ __lookupGetter__()__lookupSetter__: ƒ __lookupSetter__()get __proto__: ƒ __proto__()set __proto__: ƒ __proto__()
(anonymous) @ index-540bf1359d7e987a0de0528a844b1482.js:1
Promise.catch (async)
p @ index-540bf1359d7e987a0de0528a844b1482.js:1
(anonymous) @ index-540bf1359d7e987a0de0528a844b1482.js:1
(anonymous) @ index-540bf1359d7e987a0de0528a844b1482.js:1
load (async)
b @ index-540bf1359d7e987a0de0528a844b1482.js:1
(anonymous) @ index-540bf1359d7e987a0de0528a844b1482.js:1
(anonymous) @ index-540bf1359d7e987a0de0528a844b1482.js:1`
The topic ‘5.4 JS Errors When Deferring JS’ is closed to new replies.