-
Notifications
You must be signed in to change notification settings - Fork 642
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Querying lightswitch returns Null #5866
Comments
Do you have any entries where the |
Yes, I enabled a few entries (different sections: articles, events, projects, stories) with showInGrid Update |
It’s working fine on my end. You sure the field handle is spelled correctly in the template and the field settings? (It’s case-sensitive, too.) |
I have created a screencapture. I guess that's the easiest way. Maybe you can help me out? :-) https://www.dropbox.com/s/iliyveg3ju1ygd5/screencapture.mp4?dl=0 |
Are you using MySQL or Postgres? |
I am using a MySQL DB |
I’m a little stumped. Can you please email [email protected] with your |
Issue here ended up being that the lightswitch values were in fact not set to As of the next release, Lightswitch field params will now include |
Craft 3.4.13 is out now with this fix. |
Description
After adding a lightswitch field the following query won't work. It always returns null.
I tried showInGrid(1), showInGrid('1'), showInGrid('not 1') etc etc
When I remove the 'showInGrid' parameter and loop through all entries. The showInGrid parameter is returning correcly. And returns 1 or null.
Any clue?
Additional info
The text was updated successfully, but these errors were encountered: