Skip Navigation

[Resolved] Duplicted View returns no results if date filter is set.

This support ticket is created 3 years, 5 months ago. There's a good chance that you are reading advice that it now obsolete.

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.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Karachi (GMT+05:00)

This topic contains 6 replies, has 2 voices.

Last updated by Thorworx 3 years, 4 months ago.

Assisted by: Waqar.

Author
Posts
#1840391

Tell us what you are trying to do?

I duplicated a View (last year's) to display custom posts for the current year.
Same View, same filters.

Is there a similar example that we can see?
What is the link to your site?
Will share links in private.

I'm not getting ANY results if I change 2019 to 2020.
Previous years pages with the same views are working correctly, and returning results.

#1841099

Waqar
Supporter

Languages: English (English )

Timezone: Asia/Karachi (GMT+05:00)

Hi,

Thank you for contacting us and I'd be happy to assist.

To troubleshoot this, I'll need to see how this view is set up in the admin area.

Can you please share temporary admin login details along with the link to an example page?

Note: Your next reply will be private and please make a complete backup copy, before sharing the access details.

regards,
Waqar

#1842135

Waqar
Supporter

Languages: English (English )

Timezone: Asia/Karachi (GMT+05:00)

Thank you for sharing the admin access.

I've checked both views and noticed that their "Query Filters" are not the same.

1. In "2019 Year End Awards - View", there are two taxonomy filters added for the taxonomies "Competition Years" and "Competition Types".
( screenshot: hidden link )

2. In "2020 Year End Awards - View", there is a taxonomy filter for the taxonomy "Competition Types" and then there is a post date filter linked to the "Published date".
( screenshot: hidden link )

If you'd like the second view to function the same as the first one, you can update the query filter settings the same way and just replace 2019 with 2020.

#1842553
#1845527

Waqar
Supporter

Languages: English (English )

Timezone: Asia/Karachi (GMT+05:00)

Thanks for writing back.

That is quite strange and I'll recommend to test this view with all non-Toolset plugins disabled and a default theme like Twenty Twenty.

In case the issue still persists, I'll need a clone/snapshot of the website so that it can be investigated on a different server.
( ref: https://toolset.com/faq/provide-supporters-copy-site/ )

Please let me know how it goes and I've set your next reply as private.

#1848233

Waqar
Supporter

Languages: English (English )

Timezone: Asia/Karachi (GMT+05:00)

Thank you for sharing the duplicator package.

During troubleshooting, I noticed that view "2020 Year End Awards - View" starts showing the results correctly, if the "order by" setting is changed to something other than the "mrp_rating_result_2_star_rating" field.
( for example, you can select the post title )

If you'll include the shortcode [wpv-post-field name="mrp_rating_result_2_star_rating"] in your view's content template, you'll see that there are 123 results shown by this view and all of them have 0 value stored for this "mrp_rating_result_2_star_rating" field, which is why all these posts are ignored when ordering is set to use this particular field.

Similarly, if you'll check this field's value in the results from the view "2019 Year End Awards - View", you'll see that all those posts will have some non-zero value, which is why they are not ignored.

To overcome this, you can either choose to show the results ordered by some different field or make sure that all posts have some rating value saved in the "mrp_rating_result_2_star_rating" field.

#1855589

My issue is resolved now. Thank you!
Thanks for your assistance. It's a shame it took so long to find this very simple mistake. I'm embarrassed that I didn't see this immediately. =/

This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.