EloquentStudio / filter.js

Complete solution for client side filtering and rendering using JSON data
http://eloquentstudio.github.io/filter.js
MIT License
664 stars 183 forks source link

Filter.JS somehow pulling from another page's JSON when filtering #162

Open wabyers opened 6 years ago

wabyers commented 6 years ago

Hello, I am working for a company that is using filter.js for It's current product search page. We are running into a bizarre issue where when using a textbox search filter. One that filters by words typed in by the user, somehow text from the program page is getting pulled through the search filtration. Could it have something to do with the link attached to each program's template? We don't have anyother way for the program page json to get pulled into the search. We don't call any of it from the search page json, so it really shouldn't be happening.

Now before We go any further, we are using an anchor to allow users on the search page to reach the actual program for purchasing. The question that I want to ask is Does anyone know if filter.js pulls JSON data from links, or is it supposed to just pull from the JSON on the page? I understand that it should exclusively be filtering JSON on the page that it is activated on but I am asking because of the odd behavior our filter.js implementation is exhibiting.

Now I've looked in the function we use to get the JSON that we use to build the search results and while there are two potential spots programAlert and program Desc. Description is rarely if ever used and It's only in the SQL not JSON proper and if it was programAlert causing the issue, my bosses would not have asked me to do research as to what the issue here was. I was curious as to whether linking to another JSON filled page would cause an issue. Because Otherwise there is no real reason for the issue to occur We don't give filter.JS any access to program descriptions overridden or otherwise in the JSON that get's passed to the page and called.

Is there anything you can do that can be done quickly to get this working properly?

The searchpage with the text search filter can be found here:

https://usasportgroup.com/sports/?zip=08822&age=&site=sports