Support » Plugin: Contact Form 7 » Contact Form 7 /wp-json/ 404 Error

  • Resolved Alpesh

    (@alpesh_p2010)



    I have been using Contact Form 7 from the past few years and never had any issues with it.

    Today, I suddenly decided to test the contact form on my site and after entering the details I have clicked on Submit. It doesn’t do anything, after clicking on Submit ajax loading shows continuously without any error message.

    So, I checked the console and found

    GET https://domain.com/wp-json/contact-form-7/v1/contact-forms/3/feedback/ 404 ()

    I have checked the REST API Settings and everything is good with it, still, the form is unable to submit.

    Please look into this issue and resolve it ASAP.

    • This topic was modified 9 months ago by  Alpesh.
    • This topic was modified 9 months ago by  Alpesh.
Viewing 8 replies - 1 through 8 (of 8 total)
  • Alpesh

    (@alpesh_p2010)

    Found a fix to this problem.

    I checked my .htaccess file and found that I use trailing slash redirect. So, decided to remove the redirect and test out the form. This fixed the issue.

    Modified the trailing slash redirect to exclude URI containing /wp-json and this did the trick. Below is my trailing slash redirect .htaccess code.

    # 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
    • This reply was modified 9 months ago by  Alpesh.
    john_www

    (@john_www)

    Thanks this fixed my issue!!

    Do you know why this suddenly happened? Did a WP update cause this error?

    cocktail5555

    (@cocktail5555)

    I’m dealing with the same issue all of a sudden. Do I just add that code snippet to my htaccess file?

    john_www

    (@john_www)

    Hi @cocktail5555

    I just added this line to my htaccess:

    RewriteCond %{REQUEST_URI} !^/wp-json

    ZenBen

    (@zenben)

    Thank you @alpesh_p2010

    Another reasons for
    GET /wp-json/contact-form-7/v1/contact-forms/3/fill/ 404
    and
    POST /wp-json/contact-form-7/v1/contact-forms/3/feedback/ 404
    can be >

    1. If you’ve disabled REST API (manually or e.g. with Clearfy)
    2. If you use plugin load filter (https://de.wordpress.org/plugins/plugin-load-filter/) and filter CF7 for pages.

    as I found out.

    Cheers,
    Ben

    • This reply was modified 5 months ago by  ZenBen.
    • This reply was modified 5 months ago by  ZenBen.
    nonchiedercilaparola

    (@nonchiedercilaparola)

    If you use plugin load filter (https://de.wordpress.org/plugins/plugin-load-filter/) and filter CF7 for pages.

    @zenben you are right! i use “Plugin Organizer” to selectivelly load contact form only for contact page and i get some error:

    GET ...jquery.js?ver=1.12.4:4 GET https://www.orsilimolino.it/wp-json/contact-form-7/v1/contact-forms/4/refill

    in my case how can i fix it?

    @nonchiedercilaparola

    Add a plugin filter with the permalink set to https://www.orsilimolino.it/wp-json/contact-form-7/ and select the also affect children checkbox. Then enable Contact Form 7 on the filter.

    For me only rollback to v4.7 worked… htaccess edited like advised above, all plugins disabled/enabled, rest api checked – always 404, no result… still very curious what is the reason…

Viewing 8 replies - 1 through 8 (of 8 total)
  • You must be logged in to reply to this topic.