admin管理员组

文章数量:1406052

I just created a new website. Everything seems to work perfectly except the contact form. Indeed, the contact form is not working, and affects loading after one try. The chrome console gave me this information:

jquery-1.12.4.js:2 GET  404 ()

The website is this one: divorceamiable-mayet.fr

I just created a new website. Everything seems to work perfectly except the contact form. Indeed, the contact form is not working, and affects loading after one try. The chrome console gave me this information:

jquery-1.12.4.js:2 GET https://nameofthewebsite.fr/wp-json/contact-form-7/v1contact-form-7/v1/contact-forms/109/refill 404 ()

The website is this one: divorceamiable-mayet.fr

Share Improve this question edited Nov 26, 2019 at 17:17 Howdy_McGee 20.9k24 gold badges91 silver badges177 bronze badges asked Jan 4, 2018 at 13:50 Marvin JERNIDIERMarvin JERNIDIER 111 silver badge2 bronze badges 1
  • 2 try to desactivate all others plugins to test if you have the same problem. – mmm Commented Jan 4, 2018 at 13:58
Add a comment  | 

1 Answer 1

Reset to default 1

this is quite a common issue with htaccess file blocking malformed un-shlashed url such as cf7 wp-json requests.

Therefore check your .htaccess file in your root folder to see if this is the case with your server too, find the section in your .htaccess that is adding a '/' at the end of requests

# Add trailing slash to the end of the link
RewriteEngine on
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} !(.*)/$
RewriteCond %{REQUEST_URI} !^/wp-json
RewriteCond %{REQUEST_FILENAME} !\.(gif|jpg|png|jpeg|css|js|xml)$ [NC]
RewriteRule ^(.*)$ https://%{HTTP_HOST}/$1/ [L,R=301]
# End Adding trailing slash to the end of the link

and isnert the line RewriteCond %{REQUEST_URI} !^/wp-json to escape wp-json requests just before the RewriteRule

本文标签: javascript404 Error Contact Form 7 on WordPress