skip to Main Content

I’m using Contact Form 7 plugin to display a contact form on my WordPress site.

When I open the page with the contact form on it, the console shows a 404 error like this (where /contact-us is the page URL):

https://www.example.com/contact-us/contact-form-7/v1/contact-forms/32/refill?_locale=user (404) from api-fetch.min.js.

This isn’t a valid WordPress ajax URL – the correct URL should be:

https://www.example.com/wp-json/contact-form-7/v1/contact-forms/32/refill?_locale=user

All ajax calls used by the plugin are wrong, including the form’s submit URL, so when contact form is submitted, all it does is refresh the page.

Can anyone provide any help?
Thank you.

2

Answers


  1. Firstly, Once the user submits the contact form, It will automatically reload the page as it uses POST method where it sends the data entered by the user to the database or sends an email. So the page will be reloaded and if you dont want it to be reloaded then you can check online on how to make a form using AJAX. In wordpress, there might be plugins for it.

    For the Error:
    Please go to your FTP server and then delete the plugin you are using for the contact form and download it again. If it doesnt work then you can rollback to the previous version(maybe this can fix it)

    Login or Signup to reply.
  2. I have the same problem, & it went away when I disabled another plugin – Litespeed Cache.

    If you have any caching modules, or any modules that intercept the contact form functions, disable them all & see if the problem goes away. You should be able to identify the culprit relatively quickly.

    [ETA] LiteSpeed-specific fix:
    In WordPress admin, under LiteSpeed Cache / Page Optimisation / JS – disable "Javascript deferred" and "Javascript combine".

    (Answer found at
    https://theme.co/forum/t/contact-form-7-not-submitting-recaptcha-3-issue/53371/5)

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search