Closed freshface closed 1 week ago
What's the fieldtype of the voor_kappers
field? A toggle?
Yes
If you remove ->where('collection', 'dictionary')
from the query, do you get any results?
Same issue, no results.
I also tried it on another value by adding ->where('audio_nl ', '=', 'blijf-kalm_nl.mp3')
To search for that value in an entry, but same issue.
---
id: a03a6b20-595a-4019-9463-b99923908164
blueprint: dictionary
title: 'Blijf kalm. '
title_fr: 'Restez calme.'
title_en: 'Keep calm.'
voor_kappers: true
voor_schoonheidssector: true
themas: sos-zinnen
type: zin
audio_nl: blijf-kalm_nl.mp3
audio_fr: restez-calme_fr.mp3
audio_en: keep-calm_en.mp3
---
This works: ->where('title_en', '=', 'Keep calm.')
I think this is because the value in the yaml is also a string and audio_nl: blijf-kalm_nl.mp3
has no quotes (same as for voor_kappers: true
?)
Those should be fine without quotes.
I'm unable to replicate these issues locally - are you able to reproduce them on a fresh site?
I found my issue ->where('audio_nl ', '=', 'blijf-kalm_nl.mp3')
there was a space .... in my query 'audio_nl ',
the the space after _nl
Ah I see, that would do it!
Glad you managed to figure it out.
Haha yes, took my some time... (stupid space :)
Bug description
Quering against a boolean entry value does not give a result.
Yaml data:
Query:
Does not give any results. The debugbase says the query is like this (it casts a boolean to 1)
select * from entries where collection in ('dictionary') and voor_kappers = '1'
How to reproduce
See above
Logs
No response
Environment
Installation
Fresh statamic/statamic site via CLI
Additional details
No response