Skip Navigation

Checkboxes that save 0 are interpreted as checked by Views.

Won't fix

Reported for: Toolset Views 2.5.2

Topic Tags: Types plugin, Views plugin

Symptoms

There is an issue with the Checkbox fields that save “0” when they are not set on a post.

The problem is that the Views plugin will still read them as “checked” when you perform a Search by those fields.

Workaround

We cannot fix this.

1. If you have already a lot of posts with a Checkboxes Field saving “0” if not checked, you need to follow these steps:
– change your checkboxes Field to save nothing to the database in case it’s not checked
– update all your posts so to reflect the new settings of the custom field

2. If you have a lot of Posts, it’s reasonable to update the Posts with a Custom Script instead of manually:
https://toolset.com/forums/topic/ajax-filter-not-working-properly/page/6/#post-620904

If you need assistance with that code please contact us in the Support Forum, and prepare a Copy of your site, so we can help you adjust the code.

3. Future Versions of Types and Views will hold adjustments that will avoid this problem. For now, it is not suggested to let Checkboxes save 0 to the database.

Leave
a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>