[Resolved] Filter Query: Only dates in the past

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

This topic contains 16 replies, has 3 voices.

Last updated by Peter 4 years, 3 months ago.

Assigned support staff: Shane.

Author
Posts
#315718

I am trying to:
I want to get all events past events. I've created a date/time field with Types.
My Filter setup is:
DATETIME - lower - TODAY
I also tried:
DATE - lower - TODAY

Instead, I got:
No results (there should be a least one which I setup for testing purposes.

#315749

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Hello and thank you for contacting Toolset support.

As I understand you want to pass your custom field which is a date field and want to display the posts whose date is less than today.

Could you please see following links:
=> https://toolset.com/documentation/user-guides/passing-arguments-to-views/
=> https://toolset.com/documentation/user-guides/filtering-views-by-custom-fields/
=> https://toolset.com/documentation/user-guides/date-filters/
=> https://toolset.com/documentation/user-guides/filtering-views-query-by-date/

#315776

I did everything as pointed out in the documentation with no result.
(see screenshot)

#315951

Seems like "greater than" is working as expected - but "lower than" doesn't work....
Is this a bug in Views?`

#315956

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Could you please share a link where I can see your issue in action as well as which view you are using.

*** Please take FULL BACKUP of your database and your website.***
In order to investigate your issue if we require to check things on your install in order to see what could be going wrong there.

If you agree to this please use the form fields I have enabled below this comment box to provide temporary access details (wp-admin and FTP)?

I have set next reply as private.

#316036

Have you changed something? There are no more numbers in the "Date"-Types field?

#316040

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

I am not working on your issue yet.

Once you confirm all is OK from your end, I will take a look into it.

#316062

So please take a look.
In my opinion its a VIEWS bug, and I need a fix for this.

#316065

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Could you please tell me what is the view name you are using and I don't see any posts under section "Sendungsarchiv" right now.

#316099

The view name is "Inas Nach Sendungen Archiv"
"I don't see any posts under section "Sendungsarchiv" right now." - yes, that is the bug. There
should be one post.

When I set the filter to "lower than" and revisit the filter section the filter is set to "equal" - seems
that VIEWS is not saving this filer value correctly?

#316286

Any news on this?
It's really urgent that this problem is solved!

#316357

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Peer,

I must apologize for the delay in response but Minesh is currently unavailable due to an emergency so I will be handling this thread.

From the previous posts I gather that you are trying filter your posts based on the dates of a custom field.

I noticed that you have also provided the credentials and managed to run some tests.

There seems to be a conflict with the plugins or theme.

What I recommend that you do before we proceed is to disable all the non toolset plugins as well as switch to one of the default wordpress themes.

Once you have done this please let me know the result and we can go from there.

Thanks

#316507

I already did disable all plugins with no result.
It's definitely the filter function of VIEWS - the filter settings are not saved correctly in the database. When the filter is "lower than" a "equal to" is saved...Pleases try to reproduce this behaviour in your local installation and provide a fix.

#316635

Any news on this?

#316721

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Peer,

I must apologize for the delay in response as our support forum is closed on weekends.

I'll be taking a look at this today so please bare with me while I try to help you with resolving this issue.

Thanks