Answers.Body: <p>You can't call <code>.all()</code> twice. In <code>myEntryQuery</code> 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.</p>
  <p><code>entries</code> will now be an array, at this point you can loop through this array and output what you need.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2021-02-16T19:55:26.370Z
Answers.LastActivityDate: 2021-02-16T19:55:26.370Z
Answers.UserDisplayName: James White
Body: <p>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:
  <code>Twig Runtime Error: Impossible to invoke a method all() on an array.</code></p>
  <p>This is the code, <em><strong>but it throws it anywhere <code>all()</code></strong></em> is used:</p>
  <pre><code>{% set myEntryQuery = craft.entries()
      .section('informationPages')
      .all() %}
  
  {% set entries = myEntryQuery.all() %}
  </code></pre>
  <p>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.</p>
  <p>I checked all the file/folder permissions, updated all the .env and config items, etc.</p>
  
Tags: <error-message><error>
Title: After transferring local to server, Twig Runtime Error: Impossible to invoke a method all() on an array
ThreadText: # After transferring local to server, Twig Runtime Error: Impossible to invoke a method all() on an array
  
  (Asked by: username_0 on 2021-02-16)
  
  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()
      .section('informationPages')
      .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.
  
  **Tags:** error-message, error
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2021-02-16. Score: 3 | Accepted answer
  
  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.
  
  
  ---
  
  