• Resolved thomaspayne

    (@thomaspayne)


    Hi,

    I’ve been using Contact Form 7 here and get an unpredictable recurring error when testing out submitting a form:

    {“code”:”rest_no_route”,”message”:”No route was found matching the URL and request method.”,”data”:{“status”:404}}

    I have tried deactivating all other plugins and its still an issue. When resaving Permalinks this can temporarily fix the problem but eventually gives the same error when testing the form further. The form can also still work in general sometimes but its not clear what suddenly allows that. The unpredictability of the error makes it very difficult to troubleshoot.

    While trying to troubleshoot it with AI it recommended:

    Request your host to add or verify the following configuration snippet for your domain’s NGINX server block:

    Nginx
    location / {
    try_files $uri $uri/ /index.php?$args;
    }
    location ~ /wp-json/ {
    rewrite ^/wp-json/(.*)$ /index.php?rest_route=/$1 last;
    }

    My host has asked to confirm this with the plugin creator before making this change however. It would be great if you have any advice to help resolve this issue and if it could be a plugin issue or is something I should be chasing up with my host?

    Thanks,

    Thomas

    The page I need help with: [log in to see the link]

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author Takayuki Miyoshi

    (@takayukister)

    What other plugins and theme do you use on the site?

    Thread Starter thomaspayne

    (@thomaspayne)

    Site Plugins:
    Redirection
    Site Kit by Google
    Yoast SEO


    Although i’ve tried deactivating all of these and I still get the same problem when testing the form.

    Theme:
    Semplice v6. It mentions Contact Form 7 specifically in the theme documentation so felt it should normally be compatible.

    Plugin Author Takayuki Miyoshi

    (@takayukister)

    Try switching to the default theme, deactivating all plugins excluding Contact Form 7, Site Kit by Google and Yoast SEO, and clearing all cache data.

    Why you are advised to deactivate plugins and switch to the default theme.

    Thread Starter thomaspayne

    (@thomaspayne)

    I’ve deactivated all plugins, tried clearing cache and switched briefly to the Twenty Twenty-Five theme, switching theme however meant the form wasn’t shown on the page to be able to test it so i had to return to my main theme again.

    After all of this though, the problem still remains. The form sometimes works but seems unpredictable on returning errors.

    Plugin Author Takayuki Miyoshi

    (@takayukister)

    switching theme however meant the form wasn’t shown on the page

    Why?

    Thread Starter thomaspayne

    (@thomaspayne)

    Thats a good question. I’m not sure why it wasn’t appearing!

    I found though that the issue was created specifically when navigating to the contact page from the main page of the site. Clicking the link was changing the value of the action attribute, i think this was being caused by the theme. It’s still not clear what was causing that to change but i’ve been able to fix it for now by keeping the form in the main page of the site to avoid having to click through at all.

Viewing 6 replies - 1 through 6 (of 6 total)

The topic ‘rest_no_route error’ is closed to new replies.