Skip Navigation

[Resolved] One of the select fields doesn't show correct result

This support ticket is created 5 years, 6 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 3 replies, has 2 voices.

Last updated by Waqar 5 years, 6 months ago.

Assisted by: Waqar.

Author
Posts
#1242831

I have a filtered search and one of the filters is custom field checkbox. There are 3 different values and at the moment there are the same amount of results (or should be) in each value - as nicely can be seen after the filter's name (62). For some odd reason the result list with one of the values (the last one) shows all the posts, hundreds of them. Not the 62 as it should.

I've checked the custom fields and how they are saved to the database, everything is identical with the other 2 values. And this "problem value" is truly selected only in those 62 custom posts.

I've tested with select and original checkbox filtering, both methods show wrong results with this one, last, filter value.

#1242839
#1243375

Hi Katja,

Thank you for waiting, while I performed some tests on my website.

During troubleshooting, I noticed that this issue is reproducible if an empty space is present at the end of both "Title" and "Value to store" fields in an option for "checkboxes" type custom field.

In your "Asennuspalvelu" custom field settings too, only the "Asennusvaneriin liimattavat parketit" option had empty space at the end of both these fields, which was resulting in the incorrect results.
( screenshot: hidden link )

I've removed the empty spaces and the filter is now working correctly for all the options for "Asennuspalvelu" fields.

Appreciate you brought this forward and I've shared these findings with the concerned team for further review. Will keep you updated with the progress, through this ticket.

regards,
Waqar

#1243390

My issue is resolved now. Thank you!

#1247090

Hi Katja,

Just wanted to update that we've documented this issue with a solution at:
https://toolset.com/errata/empty-trailing-spaces-in-checkboxes-field-labels-can-lead-to-wrong-results-shown-in-views-filtered-by-those-fields/

regards,
Waqar