cms icon indicating copy to clipboard operation
cms copied to clipboard

[5.x]: Issue querying against checkbox fields

Open TGriffiths88 opened this issue 3 months ago • 2 comments

What happened?

Description

When trying to narrow a query via a checkbox field alone. Combined with other fields it seems to be okay.

{% extends '_/layouts/default' %}

{% block content %}
    {% set test = craft.entries().section('solutions').gender('male').all() %}
    {% dd test %}
{% endblock %}
Image

Steps to reproduce

  1. Create a section
  2. Add a checkbox field to it
  3. Create a few test entries with various values on the checkboxes
  4. Create simple template and try to query the section with a value passed to the checkbox field in the query
  5. It should throw an exception

Expected behavior

It should execute the query absolutely fine

Actual behavior

Throws am exception

Craft CMS version

5.8.20

PHP version

8.3.23

Operating system and version

Linux 6.17.8-orbstack-00308-g8f9c941121b1

Database type and version

MySQL 8.0.40

Image driver and version

Imagick 3.8.0 (ImageMagick 6.9.11-60)

Installed plugins and versions

"craftcms/feed-me": "6.11.0", "craftcms/postmark": "^3.1", "nystudio107/craft-retour": "5.0.12", "nystudio107/craft-seomatic": "5.1.19", "nystudio107/craft-vite": "5.0.1", "putyourlightson/craft-blitz": "5.12.5", "putyourlightson/craft-sprig": "3.7.1", "vaersaagod/dospaces": "3.2.1", "verbb/hyper": "2.2.10", "viget/craft-classnames": "3.0.0", "vlucas/phpdotenv": "^5.6.0"

TGriffiths88 avatar Dec 03 '25 12:12 TGriffiths88

CMS-1702

linear[bot] avatar Dec 03 '25 12:12 linear[bot]

Hi, thanks for getting in touch. I’m not able to reproduce this. Could you please send your composer.json, composer.lock, and database export to [email protected] so that we can try to reproduce and dig deeper?

i-just avatar Dec 03 '25 13:12 i-just