The operation failed with an error. [404] No route was found matching the URL and request method. (error code: rest_no_route)

I am trying to update one field in wordpress posts dynamically based upon data in a spreadsheet. As you see, I have the google sheet watcher, works fine, I have the connection to my website’s rest api, connects as I can choose post types, but when executing I get the following error:

The operation failed with an error. [404] No route was found matching the URL and request method. (error code: rest_no_route)

I don’t know what this means. The rest api url is correct, I am assuming that it constructs a url based upon the fields in module? I don’t know. Some hints or a solution would be great. Yes, I looked at other posts and all those I looked at, people tried to help and asked for screenshots and the posters didn’t respond. Well, I’m including screenshots. The mysql module is just another way I was trying to accomplish the same thing, that route is disabled.

:slight_smile:

1 Like

I am searching for a particular post id, that is what is in the search field of the module.

I’ve also disabled plugins, notably Wordfence. Same issue.

Check with your web hosting provider if they have ModSecurity installed.

ModSecurity is an open source firewall solution that some web hosts automatically enable on their servers. Some configurations of ModSecurity can accidentally block valid requests to your server.

samliewrequest private consultation

Join the Make unofficial Discord server!

1 Like

Thanks. Will do. What needs to be modified in Mod Security, if installed?

That said, if mod security was the issue, wouldn’t it prevent the module from acquiring and surfacing the TYPE would it not?

They use nginx firewall. Disabled it entirely. No change.

Interesting. The module is not able to parse the PLACES type. If I change to POSTS, it works but of course my information is under PLACES and not POSTS. PLACES is available in rest api, I see if when I visit mysite.com/wp-json

https://mysite.com/wp-json/geodir/v2/places/
The link above resolves. You can see in the last screen shot, I can select PLACES, but if I do, i get the no route error.

I get the error

This site can’t be reached
mysite.com refused to connect.

You’ll need to check if the server is blocking any requests, or if the DNS is incorrectly set-up.

samliewrequest private consultation

Join the Make unofficial Discord server!

1 Like

that is because ‘mysite’ is not a real website. it was just an example.

visit https://laantiguagt.com/wp-json/geodir/v2/places you will see the site I am talking about

I see now. This plugin does not allow you to get the custom post type gd_place using the default endpoint, starting with /wp-json/wp/v2/

e.g.: get all post type for “posts”

and custom post type “place” or “gd_place” doesn’t work

This is due to how the plugin runs their API.

According to their API documentation, you need to use this URL instead

So, you should use the HTTP “Make a Request” module with the above URL.

Output

1 Like

Interesting! So don’t use the Wordpress module, but the http module.

Then to update the one field, I would use the POST option in the html module?

HTTP “Make an API Key Auth request” module.

You likely also need to set up authentication with the site API key because it’s a write operation.

samliewrequest private consultation

Join the Make unofficial Discord server!

1 Like

maybe I’ll hire you to help me. is this an option?

1 Like

Yes. You can also post in the Professional Services forum category, or join the unofficial Discord server!

2 Likes