Plugin Contributor
dudo
(@dudo)
Hello!
This is strange, seems like the rest response returns a 404.
Can you please try to save again your permalinks? (Settings->Permalink->Save settings) You don’t need to change settings, just save again.
Let me know!
Hello,
Thanks for your help. I just tried but it does not work. :/
I just tried the different versions of your plugin to find out where the problem came from and I can confirm that it comes since version 2.3 because version 2.2.9 works fine. So, do you have an idea to solve the problem?
-
This reply was modified 6 years, 1 month ago by
testwp75.
-
This reply was modified 6 years, 1 month ago by
testwp75.
Plugin Contributor
dudo
(@dudo)
You don’t need to downgrade to version 2.2.9: just select “no” to the last setting (Load results with AJAX) to have the same situation.
But hovewer it’s strange that you’ve a 404 response: can you please try to deactivate all your plugin 1 by 1?
Ok it’s works when I do that thanks! I use wp-rocket, it’s not a compatible caching plugin ? 404 disappeared too with the same option disabled.
-
This reply was modified 6 years, 1 month ago by
testwp75.
I just installed this plugin and noticed the same error. I’m playing around on a staging site so I have no caching enabled, and I was just testing the AJAX option for the sake it.
This is what the REST API returns:
{"code":"rest_post_invalid_id","message":"Invalid post ID.","data":{"status":404}}
-
This reply was modified 6 years, 1 month ago by
hshah.
@dudo
I think I know why this is happening. It is down to the fact that I’m trying to implement this on a CPT, and I’m guessing @testwp75 was doing the same.
I have REST API enabled for my CPT, and the base will be the “post_type”, which in my case is “photos”.
The plugin is making a call to:
/wp-json/wp/v2/posts/
Which is correctly returning a 404 because the “post_id” doesn’t exist under the base “posts”.
If I take the full URL, just change the word “posts” to “photos” and pop it into the browser, I get back the expected results 🙂
Plugin Contributor
dudo
(@dudo)
Hi @hshah, seems like you got the point!
I will work on this and try to fix for the next version.
Best,
Dario
Plugin Contributor
dudo
(@dudo)
I’ve fixed this, and fix will be available in the next version.
Best,
Dario
@dudo
Great. I’ll update when it is released and report back 🙂
Plugin Contributor
dudo
(@dudo)
Fixed with version 2.3.3 🙂
Best,
Dario