I transferred site from MAMP to Arcustech server and the Admin panel works fine, I even updated to 3.6.6, but the front-facing site throws an error: Twig Runtime Error: Impossible to invoke a method all() on an array.

This is the code, but it throws it anywhere all() is used:

{% set myEntryQuery = craft.entries()
    .all() %}

{% set entries = myEntryQuery.all() %}

I'm new to Craft so I'm probably doing something dumb, but the site works fine in MAMP so I'm not sure where to start in running this down.

I checked all the file/folder permissions, updated all the .env and config items, etc.

1 Answer 1


You can't call .all() twice. In myEntryQuery you have converted the result into an array, you are then trying to call .all() again, but at this point you have an array, so .all() can't be used as it's not an entry query anymore.

entries will now be an array, at this point you can loop through this array and output what you need.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.