Answers.Body: <p>I also got the second error when trying to create a new field and the solution for me was running </p>
  
  <pre><code>./craft clear-caches/all
  </code></pre>
  
  <p>after a refresh it started working again</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-04-04T13:26:02.040Z
Answers.LastActivityDate: 2019-04-04T13:26:02.040Z
Answers.UserDisplayName: Glenn De Backer
Answers.Body: <p>Updating to the latest release (currently <a href="https://github.com/craftcms/cms/blob/develop/CHANGELOG-v3.md#31201---2019-03-27" rel="nofollow noreferrer">Craft 3.1.20.1</a>) should fix your first error.</p>
  
  <p>Not sure if it'll fix your second one, but comment back here if it doesn't.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-04-01T21:01:21.547Z
Answers.Text: upgraded but still getting both errors.  When ever I try to upgrade I get a fatal error but when I hit the back button I see that the upgrade has actually happened and that the version has changed.
Answers.UserDisplayName: fodney
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-04-01T22:52:17.663Z
Answers.Text: "I get a fatal error" - that makes the update suspect. I'd revert the database to a last known good state, fix whatever is causing the fatal error, then attempt the update again.
Answers.UserDisplayName: Brad Bell
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-04-03T18:27:40.440Z
Answers.Text: We reverted to the last known good state but we are still getting all kinds of errors.  Can't add fields etc.  Really at a loss as to what to do next. If there is anyway you can help I would appreciate it.
Answers.UserDisplayName: fodney
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-04-03T20:24:39.940Z
Answers.Text: If this is on a public box and you want to send from Craft CP and SSH access over to support@craftcms.com, we can take a look at it.
Answers.UserDisplayName: Brad Bell
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-04-04T17:19:50.623Z
Answers.Text: Thanks Brad I appreciate it but we finally got it figured out.  Rolled back to 3.1.15 and it seems to be good now.  We moved it to a new server which is much faster.  I think on the old server it was just timing out before it could complete an update.
Answers.UserDisplayName: fodney
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-04-01T20:56:49.397Z
Answers.LastActivityDate: 2019-04-01T20:56:49.397Z
Answers.UserDisplayName: Brad Bell
Body: <p>Running Craft 3.1.19 and have started getting twig error in the control panel.  When I click on the utilities link I get this error:</p>
  
  <pre><code>Declaration of craft\web\twig\Environment::compileSource(Twig\Source $source) should be compatible with Twig_Environment::compileSource(Twig_Source $source)
  </code></pre>
  
  <p>And when I try to create a new field I get this error: </p>
  
  <pre><code>Key "defaultUploadLocationSubpath" in object with ArrayAccess of class "craft\fields\Assets" does not exist.
  </code></pre>
  
  <p>Any idea what is going on?</p>
  
  <p>Thanks!</p>
  
Tags: <templating><error>
Title: Twig errors on v3.1.19
ThreadText: # Twig errors on v3.1.19
  
  (Asked by: username_0 on 2019-04-01)
  
  Running Craft 3.1.19 and have started getting twig error in the control panel. When I click on the utilities link I get this error:
  
  ```
  Declaration of craft\web\twig\Environment::compileSource(Twig\Source $source) should be compatible with Twig_Environment::compileSource(Twig_Source $source)
  
  ```
  
  And when I try to create a new field I get this error:
  
  ```
  Key "defaultUploadLocationSubpath" in object with ArrayAccess of class "craft\fields\Assets" does not exist.
  
  ```
  
  Any idea what is going on?
  
  Thanks!
  
  **Tags:** templating, error
  
  
  ---
  
  ## 2 answers
  
  ### Answer by username_1 on 2019-04-04. Score: 1
  
  I also got the second error when trying to create a new field and the solution for me was running
  
  ```
  ./craft clear-caches/all
  
  ```
  
  after a refresh it started working again
  
  
  ---
  
  ### Answer by username_2 on 2019-04-01. Score: 0
  
  Updating to the latest release (currently [Craft 3.1.20.1](https://github.com/craftcms/cms/blob/develop/CHANGELOG-v3.md#31201---2019-03-27)) should fix your first error.
  
  Not sure if it'll fix your second one, but comment back here if it doesn't.
  
  > **Comments:**
  > **username_0**: upgraded but still getting both errors.  When ever I try to upgrade I get a fatal error but when I hit the back button I see that the upgrade has actually happened and that the version has changed.  
  > **username_2**: "I get a fatal error" - that makes the update suspect. I'd revert the database to a last known good state, fix whatever is causing the fatal error, then attempt the update again.  
  > **username_0**: We reverted to the last known good state but we are still getting all kinds of errors.  Can't add fields etc.  Really at a loss as to what to do next. If there is anyway you can help I would appreciate it.  
  > **username_2**: If this is on a public box and you want to send from Craft CP and SSH access over to support@craftcms.com, we can take a look at it.  
  > **username_0**: Thanks username_2 I appreciate it but we finally got it figured out.  Rolled back to 3.1.15 and it seems to be good now.  We moved it to a new server which is much faster.  I think on the old server it was just timing out before it could complete an update.  
  
  ---
  
  