Closed bartrylant closed 6 years ago
Could you maybe show a stack trace of something? Because there are actually only 2 loops in the plugin, one is executed right after all()
the other one is Yii::configure()
and would be a bug in the framework
Deprecation error: Looping through element queries directly has been deprecated. Use the all() function to fetch the query results before looping over them. Called from /srv/users/knvvl/apps/knvvl-app/vendor/craftcms/cms/src/elements/db/ElementQuery.php:456
craft\elements\db\MatrixBlockQuery::getIterator() Called from /srv/users/knvvl/apps/knvvl-app/storage/runtime/compiled_templates/92/9227cac0471c9ba93712391d95351d6bf944a96fd3cf41bbbec1363f42d48c91.php:228
__TwigTemplate_f4e1c47be3ea8ca02230b12a82622ca43acbcadce58a6c968e7d74cdae0a98e9::macro_moreEntry(craft\elements\Entry, 2, "") Called from /srv/users/knvvl/apps/knvvl-app/storage/runtime/compiled_templates/92/9227cac0471c9ba93712391d95351d6bf944a96fd3cf41bbbec1363f42d48c91.php:80
__TwigTemplate_f4e1c47be3ea8ca02230b12a82622ca43acbcadce58a6c968e7d74cdae0a98e9::doDisplay(["entry" => craft\elements\Entry, "variables" => ["entry" => craft\elements\Entry], "view" => craft\web\View, "SORT_ASC" => 4, ...], []) Called from /srv/users/knvvl/apps/knvvl-app/vendor/twig/twig/lib/Twig/Template.php:390
...
The stack trace is about a matrix block query, your code about an entry query. Are you really sure this is related?
Not seeing any deprecation errors coming from Similar
When setting limit criteria like this:
{% set limitCriteria = craft.entries.limit(4) %}
, there will be a deprecation error in the CP: