Open JelmerOT opened 3 weeks ago
You can filter entries by taxonomies like this:
query MyQuery {
entries(
collection: "articles"
filter: {article_categories: {contains: "slapen"}}
) {
data {
id
title
}
}
}
That works, but not with another category with a similar name. Seems that contains
just looks if the word exists somewhere.
And I can't do something like this, because I get an error:
filter: {
article_categories: {
is: "slapen"
}
}
The error:
strtolower(): Argument #1 ($string) must be of type string, array given
Ah, yeah. I was just referencing the answer to a previous discussion: #4983
Bug description
I made a query to fetch articles based on the ID of the taxonomy.
This is what it returns:
You can see that the second article does not contain a taxonomy with an id of
article_categories::slapen
.How to reproduce
Create a new statamic project. Create an
articles
collection andarticle_categories
taxonomy. Connect these two.Then query the articles with a filter.
Logs
No response
Environment
Installation
Fresh statamic/statamic site via CLI
Additional details
No response