Contact form 7 doesnt work for the cache?
-
The submit button stop working in my form in contact form 7 v5.4.
I think is related to the cache.
How can i impleement ESI?
Any recomendations? Lower TTL? THX-
This topic was modified 5 years, 4 months ago by
josede.
-
This topic was modified 5 years, 4 months ago by
-
Hi,
please try enable ESI, add these into ESI nonce list
wp_rest private wpcf7* privatepurge all , and see how it goes
Best regards,
Its weird. I opened the page from google.com “cache version”
I have the same error with your solution.VM12:1 POST https://example.eu/wp-json/contact-form-7/v1/contact-forms/55/feedback?_locale=user 403 (anonymous) @ VM12:1 F @ api-fetch.min.js?ver=a783d1f442d2abefc7d6dbd156a44561:2 (anonymous) @ api-fetch.min.js?ver=a783d1f442d2abefc7d6dbd156a44561:2 tryCatch @ wp-polyfill.min.js?ver=7.4.4:1 invoke @ wp-polyfill.min.js?ver=7.4.4:1 t.<computed> @ wp-polyfill.min.js?ver=7.4.4:1 n @ api-fetch.min.js?ver=a783d1f442d2abefc7d6dbd156a44561:2 a @ api-fetch.min.js?ver=a783d1f442d2abefc7d6dbd156a44561:2 (anonymous) @ api-fetch.min.js?ver=a783d1f442d2abefc7d6dbd156a44561:2 (anonymous) @ api-fetch.min.js?ver=a783d1f442d2abefc7d6dbd156a44561:2 (anonymous) @ api-fetch.min.js?ver=a783d1f442d2abefc7d6dbd156a44561:2 (anonymous) @ api-fetch.min.js?ver=a783d1f442d2abefc7d6dbd156a44561:2 I @ api-fetch.min.js?ver=a783d1f442d2abefc7d6dbd156a44561:2 (anonymous) @ api-fetch.min.js?ver=a783d1f442d2abefc7d6dbd156a44561:2 f @ api-fetch.min.js?ver=a783d1f442d2abefc7d6dbd156a44561:2 (anonymous) @ api-fetch.min.js?ver=a783d1f442d2abefc7d6dbd156a44561:2 I @ api-fetch.min.js?ver=a783d1f442d2abefc7d6dbd156a44561:2 (anonymous) @ api-fetch.min.js?ver=a783d1f442d2abefc7d6dbd156a44561:2 (anonymous) @ api-fetch.min.js?ver=a783d1f442d2abefc7d6dbd156a44561:2 f @ api-fetch.min.js?ver=a783d1f442d2abefc7d6dbd156a44561:2 (anonymous) @ api-fetch.min.js?ver=a783d1f442d2abefc7d6dbd156a44561:2 (anonymous) @ api-fetch.min.js?ver=a783d1f442d2abefc7d6dbd156a44561:2 t @ api-fetch.min.js?ver=a783d1f442d2abefc7d6dbd156a44561:2 (anonymous) @ api-fetch.min.js?ver=a783d1f442d2abefc7d6dbd156a44561:2 R @ api-fetch.min.js?ver=a783d1f442d2abefc7d6dbd156a44561:2 (anonymous) @ api-fetch.min.js?ver=a783d1f442d2abefc7d6dbd156a44561:2 (anonymous) @ index.js?ver=5.4:1 (anonymous) @ api-fetch.min.js?ver=a783d1f442d2abefc7d6dbd156a44561:2 (anonymous) @ index.js?ver=5.4:1 (anonymous) @ api-fetch.min.js?ver=a783d1f442d2abefc7d6dbd156a44561:2 X @ api-fetch.min.js?ver=a783d1f442d2abefc7d6dbd156a44561:2 f @ index.js?ver=5.4:1 (anonymous) @ index.js?ver=5.4:1 Show 3 more frames search?q=cache:399MUcsdwokJ:https://example.eu/+&cd=1&hl=es&ct=clnk&gl=es:1 Access to fetch at 'https://example.eu/wp-admin/admin-ajax.php?action=rest-nonce' from origin 'https://webcache.googleusercontent.com' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource. If an opaque response serves your needs, set the request's mode to 'no-cors' to fetch the resource with CORS disabled. VM12:1 GET https://example.eu/wp-admin/admin-ajax.php?action=rest-nonce net::ERR_FAILEDShould I add anything else in my HTML code? Related to ESI.
-
This reply was modified 5 years, 4 months ago by
josede.
try add
contact-forminto JS exclude , save and purge , see how it goesThe same issue. i checked chrome devs.
In Network:
feedback?_locale=user 403 h3-Q050 fetch VM12:1 241 B 376 ms
admin-ajax.php?action=rest-nonce CORS error fetch VM12:1 0 B 392 msIn Console:
VM12:1 POST https://example.eu/wp-json/contact-form-7/v1/contact-forms/242/feedback?_locale=user 403 VM12:1Access to fetch at 'https://example.eu/wp-admin/admin-ajax.php?action=rest-nonce' from origin 'https://webcache.googleusercontent.com' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource. If an opaque response serves your needs, set the request's mode to 'no-cors' to fetch the resource with CORS disabled. search?q=cache:399MUcsdwokJ:https://example.eu/+&cd=1&hl=es&ct=clnk&gl=es:1GET https://example.eu/wp-admin/admin-ajax.php?action=rest-nonce net::ERR_FAILED VM12:1TypeError: Failed to fetch index.js?ver=5.4:1huh ?
CORS errorwhy would it even give CORS error ? are you fetching js from different domain or something ?I have a wordpress installation, fresh.
Contact form 7 with LiteSpeedCache. All updated.
1 domain, no redirections no coded added.
The page is load from google cache.Maybe its for the quic.cloud cdn?
-
This reply was modified 5 years, 3 months ago by
josede.
when you load page from other page , this is normal to have CORS error , you need to add CORS header to allow it to be fetched by other domain , in this case
-
This reply was modified 5 years, 4 months ago by
The topic ‘Contact form 7 doesnt work for the cache?’ is closed to new replies.