Skip Navigation

[Resolved] View sort with numeric field with null value causes no records found

This support ticket is created 3 years, 9 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
- 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10: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/Kolkata (GMT+05:30)

Tagged: 

This topic contains 2 replies, has 2 voices.

Last updated by martinE-4 3 years, 9 months ago.

Assisted by: Minesh.

Author
Posts
#1922663

I noticed that when I sorted by a custom numeric field which had no values in it, that the view returned "No records found"

When I tried to adjust the sort to something else in the Block editor the view became corrupted and would not return to working properly.

FIX: I put zeroes in the numeric sort field so that there were no null values, and then created a new view in the block editor and it worked fine after that.

Suggestion: sorting with a numeric cpt with null values should not return "No records". It should default to the date published.

#1922855

Minesh
Supporter

Languages: English (English )

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

Hello. Thank you for contacting the Toolset support.

Toolset follow the WordPress standard and with WordPress if you have a custom field that does not save any value, you will not find any related meta key will be added to postmeta table.

So, this is expected and we can not do much here. You will to keep using the workaround you shared.

#1927105

Thank you! At least I know how to fix it. Too bad there can't be some sort of override, default for such situations.