Hello, I have a view which I need to display events and the query should include only events that have an end date (costume field) greater than today.
also, I need a filter for the start and end date fields which I have set and worked correctly but I can't add a secondary filter for the same field. so I can't filter out events that already have ended and have a manual filter.
I tried to remove the manual filter and only display events greater than today but it failed to filter them out.
I have tried using a number as the type and an unsigned like suggested here https://toolset.com/forums/topic/query-filters-arent-working-as-expected/
but it did not work.
Another problem is that if I go to an event and try to modify the start or end date field I get a js error.
SyntaxError: Unexpected token o in JSON at position 1.
Sorry for the delay getting back to you, there was quite a backlog of tickets after the weekend.
It's not possible to have both a backend Query Filter (which operates on every page load) and also front-end search filter for the same field that temporarily overrides it.
At least it is not possible to add such conditions using the UI.
You effectively need a default value for the filter (i.e. later than today) which is applied if no front-end filter is set.
For that you can use the API, specifically the wpv_filter_query hook to check whether there is an existing filter value for the custom field and if not apply one.
If that is not something you are comfortable with I can help you, though it will be tomorrow.
Your other problem with the JSON error, do you mean when you are editing the post in the backend?
I'd need access to your site to be able to take a look, but before that, can you check whether you still see the problem when all non-Toolset plugins are deactivated and after switching theme to twentytwenty? There may be a conflict with code from another vendor.
Finally, it would help if you could include your debug info in your next reply: hidden link