<p>Sorted YAY! </p>

<p>In case this is helpful to anyone, I tried deleting and reinstalling via composer then replacing the config and .env files but no luck there so I downloaded the latest version and updated just the vendor folder. It needed to update the database which it couldn't do for me so I took a manual backup and let it do it's thing and now it's all working again! </p>

CC BY-SA 4.0
2020-02-11T22:32:35.410Z
2020-02-11T22:32:35.410Z
Jana
<p>I am a front end designer building my site locally. This is the first time I've built in Craft and things have been coming along fine but now I'm getting the following error on every craft admin page and I'm not sure what's happened or how to fix it. </p>

<blockquote>
  <p>Twig\Error\SyntaxError: The block 'content' has already been defined
  line 256. in
  /Users/jinora/sites/janahoffmann/_repo/v4/vendor/craftcms/cms/src/templates/_layouts/cp.html:274</p>
</blockquote>

<p>The front end of the site seems fine and still loads all the templates and entries.</p>

<p>I had just changed an asset field to use a different folder and they weren't loading on the front end so I went into utilities and tried clearing the database cache and that's when the admin stopped working. </p>

<p>I had recently named a block in my templates 'content' but it had been working fine for a little while and I tried renaming the block but that didn't fix anything.</p>

<p>I had noticed that there was a new craft update but hadn't got to it before so I tried using terminal to update it as per this docs page (since I can't get to the control panel update) <a href="https://docs.craftcms.com/v3/updating.html#updating-from-the-control-panel" rel="nofollow noreferrer">https://docs.craftcms.com/v3/updating.html#updating-from-the-control-panel</a>. Weirdly it says the following...</p>

<blockquote>
<pre><code>Craft isn’t installed yet!    
</code></pre>
  
  <p>Fetching available updates ... done You’re all up-to-date!</p>
</blockquote>

<p>I took back ups and then tried clearing the storage/runtime/cache and compiled_templates folders, I restarted mamp and closed the browser but still nothing. I haven't messed around with anything outside the web or templates folder before this so I'm completely stumped as to what's happened and how to fix it. </p>

<p>Can anyone point me in the right direction?</p>

CC BY-SA 4.0
2020-02-05T02:14:27.127Z
Weird... what version of Craft?  If you have composer installed from the command line, can you run `composer update` from your project's root, let that finish and see if that helps?
Brad Bell
CC BY-SA 4.0
2020-02-05T02:56:38.350Z
I'm not entirely sure how to tell what version I have without being able to access the diagnostic page, but since I had 1 update alert before the crash I'd say it's 3.4.2?  I did do a composer install. I'm at work now but I'll try it as soon as I get home.  Thanks!
Jana
CC BY-SA 4.0
2020-02-05T10:38:24.320Z
I've run the composer update and that hasn't changed anything unfortunately, I still get "Craft isn’t installed yet! Fetching available updates ... done You’re all up-to-date!" and when I try ./craft update the admin is still errors after login. 

I remembered that I had trouble with the final composer installation instructions following the CraftQuest course & I missed instructions on moving composer on MacOS if you have trouble. I had installed, used & run craft updates from in the CMS so I'm not sure if that's relevant but I've reinstalled and moved composer to the right spot now anyway.
Jana
<craft3><error-message><admin><error-templates>
Craft admin twig templates broken somehow
# Craft admin twig templates broken somehow

(Asked by: username_0 on 2020-02-04)

I am a front end designer building my site locally. This is the first time I've built in Craft and things have been coming along fine but now I'm getting the following error on every craft admin page and I'm not sure what's happened or how to fix it. 

Twig\Error\SyntaxError: The block 'content' has already been defined
  line 256. in
  /Users/jinora/sites/janahoffmann/_repo/v4/vendor/craftcms/cms/src/templates/_layouts/cp.html:274

The front end of the site seems fine and still loads all the templates and entries.
I had just changed an asset field to use a different folder and they weren't loading on the front end so I went into utilities and tried clearing the database cache and that's when the admin stopped working. 
I had recently named a block in my templates 'content' but it had been working fine for a little while and I tried renaming the block but that didn't fix anything.
I had noticed that there was a new craft update but hadn't got to it before so I tried using terminal to update it as per this docs page (since I can't get to the control panel update) https://docs.craftcms.com/v3/updating.html#updating-from-the-control-panel. Weirdly it says the following...

Craft isn’t installed yet!    

Fetching available updates ... done You’re all up-to-date!

I took back ups and then tried clearing the storage/runtime/cache and compiled_templates folders, I restarted mamp and closed the browser but still nothing. I haven't messed around with anything outside the web or templates folder before this so I'm completely stumped as to what's happened and how to fix it. 
Can anyone point me in the right direction?

**Tags:** craft3, error-message, admin, error-templates

> **Comments:**
> **username_1**: Weird... what version of Craft?  If you have composer installed from the command line, can you run `composer update` from your project's root, let that finish and see if that helps?  
> **username_0**: I'm not entirely sure how to tell what version I have without being able to access the diagnostic page, but since I had 1 update alert before the crash I'd say it's 3.4.2?  I did do a composer install. I'm at work now but I'll try it as soon as I get home.  Thanks!  
> **username_0**: I've run the composer update and that hasn't changed anything unfortunately, I still get "Craft isn’t installed yet! Fetching available updates ... done You’re all up-to-date!" and when I try ./craft update the admin is still errors after login.   I remembered that I had trouble with the final composer installation instructions following the CraftQuest course & I missed instructions on moving composer on MacOS if you have trouble. I had installed, used & run craft updates from in the CMS so I'm not sure if that's relevant but I've reinstalled and moved composer to the right spot now anyway.  

---

## 1 answers

### Answer by username_0 on 2020-02-11. Score: 1

Sorted YAY!

In case this is helpful to anyone, I tried deleting and reinstalling via composer then replacing the config and .env files but no luck there so I downloaded the latest version and updated just the vendor folder. It needed to update the database which it couldn't do for me so I took a manual backup and let it do it's thing and now it's all working again!


---

