bearded-avenger / wp-live-search

A live search plugin for WordPress that utilizes REST API + Backbone + Underscore
http://nickhaskins.com/wp-live-search/
GNU General Public License v2.0
101 stars 13 forks source link

Doesn't return any result on the server #9

Closed lmartins closed 9 years ago

lmartins commented 9 years ago

Hi,

I've managed to get the plugin working locally but for some reason on the server side I can't. The URL seems to be correct, but I get nothing from the JSON-API, which is installed, the url being request is: http://ajuda.webipack.pt/wp-json/posts?type=doc&filter[s]=art&filter[posts_per_page]=20

Do you have suggestion of what I should be looking at?

Many Thanks

bearded-avenger commented 9 years ago

Hrm, I really don't have an answer for that one. This plugin , as you are probably aware, just shows results from the API. What's interesting is that this works

http://ajuda.webipack.pt/wp-json/posts?type=doc&[s]=art&filter[posts_per_page]=20

Notice the lack of the "filter" in front of the [s] query.

lmartins commented 9 years ago

Yeah, i've also noticed that and it's really weird, although the json that gets back isn't filtered, it's just returning all the posts in the database it seems.

Thanks for your help anyway Nick. I'll keep on testing to see if I can find the issue.

Cheers.

bearded-avenger commented 9 years ago

you know what, their docs say that you have to have these [brackets] but I'm seeing that they aren't even necessary. http://ajuda.webipack.pt/wp-json/posts?type=doc&s=art&posts_per_page=20. I"ll keep poking around

lmartins commented 9 years ago

What's really weird about this is that I have the exact same versions of WP, Rest API and Live Search on both the local and live environments yet locally runs fine but on the live server it won't run for the life of me.

Not really sure what else to try.