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
EntryQuery::typeId() does not accept array syntax with not
anymore
#6754
Comments
not
anymore
Whoops, sorry about that. Fixed for the next release. |
Thank you. But what's the point of querying for the correct ids again? My whole point in passing ids instead of the handle is to reduce the amount of queries. |
In 3.5 we need to know the exact entry type IDs (if specified) so we can register them as cache invalidation tags, if a cache is actively being created: cms/src/elements/db/EntryQuery.php Lines 1015 to 1018 in b628058
That way if the query is surrounded by |
Craft 3.5.8 is out now with that fix. |
Description
After Updating to Craft 3.5 the
typeId
syntax stated in the PHPDoc via['not', 1, 2]
https://github.com/craftcms/cms/blob/develop/src/elements/db/EntryQuery.php#L417
does not work anymore, cause
not
is not a string in_normalizeTypeId
https://github.com/craftcms/cms/blob/develop/src/elements/db/EntryQuery.php#L921Steps to reproduce
Entry::find()->typeId(['not', 1, 2])->all();
yii\base\InvalidConfigException: Invalid typeId param value
becauseis_numeric('not')
returns falseAdditional info
The text was updated successfully, but these errors were encountered: