# All previously valid AMP pages became invalid with latest Ghost 4 release

**URL:** https://forum.ghost.org/t/all-previously-valid-amp-pages-became-invalid-with-latest-ghost-4-release/20837
**Category:** Marketplace
**Created:** [March 17, 2021, 1:57pm UTC](https://forum.ghost.org/t/all-previously-valid-amp-pages-became-invalid-with-latest-ghost-4-release/20837 "2021-03-17T13:57:25Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![DerpyCoder](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/derpycoder/32/11522_2.png) [@DerpyCoder](https://forum.ghost.org/u/DerpyCoder)
#### Post date: [March 17, 2021, 1:57pm UTC](https://forum.ghost.org/t/all-previously-valid-amp-pages-became-invalid-with-latest-ghost-4-release/20837/1 "2021-03-17T13:57:25Z")

</div>

![image](https://us1.discourse-cdn.com/flex015/uploads/ghost2/original/2X/2/2387ca13851d3ff7e520a8052b95b410aaa77c78.png)

`<style>:root {--ghost-accent-color: #f8633b;}</style>`

Is the root of the issue.

I don’t see it in my existing code, which means Ghost started adding it recently.

Can someone please add _ **amp-custom** _ to the above tag like:  
`<style amp-custom>...</style>`

Here’s a link to my blog post:  
[https://www.derpycoder.com/how-to-approach-web-design-without-a-designer-in-tow/](https://www.derpycoder.com/how-to-approach-web-design-without-a-designer-in-tow/)

---

<div class="post-metadata">

### Author: ![Kevin](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/kevin/32/32_2.png) [@Kevin](https://forum.ghost.org/u/Kevin)
#### Post date: [March 17, 2021, 3:11pm UTC](https://forum.ghost.org/t/all-previously-valid-amp-pages-became-invalid-with-latest-ghost-4-release/20837/2 "2021-03-17T15:11:49Z")

</div>

It’s a known issue, there’s a fix already in place for the next release

> <https://github.com/TryGhost/Ghost/issues/12770>
>
> \### Issue Summary
> 
> After upgrading to Ghost 4.0, Google Search Console starts …throwing AMP validation errors on several posts in my website. After further checking with The AMP Project's Validator website, the validation error looks like to be related to the new addition of the accent color CSS variable in Ghost 4.0. The style tag there looks like to be missing the amp-custom attribute, required by AMP.
>  
> !\[image\](https://user-images.githubusercontent.com/5674601/111272105-b7985f00-8664-11eb-8e4a-094b0b66cc29.png)
> 
> \### To Reproduce
> 
> 1. Go to \[The AMP Project's Validator\](https://validator.ampproject.org/)
> 2. Enter an AMP url from a Ghost site (I used my own post \[here\](https://blog.nanao.moe/game-reviews/blue-archive/amp/) in the screenshot)
> 
> \### Technical details:
> 
> \* Ghost Version: 4.0.1
> \* Node Version: 14.16.0
> \* Database: MariaDB

---

<div class="post-metadata">

### Author: ![DerpyCoder](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/derpycoder/32/11522_2.png) [@DerpyCoder](https://forum.ghost.org/u/DerpyCoder)
#### Post date: [March 18, 2021, 2:38pm UTC](https://forum.ghost.org/t/all-previously-valid-amp-pages-became-invalid-with-latest-ghost-4-release/20837/3 "2021-03-18T14:38:10Z")

</div>

Thanks @Kevin,

I didn’t know issues are being tracked separately in GitHub, else I would have checked there first.

Thanks for a prompt fix.

---

<div class="post-metadata">

### Author: ![daniellockyer](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/daniellockyer/32/11993_2.png) [@daniellockyer](https://forum.ghost.org/u/daniellockyer)
#### Post date: [March 18, 2021, 6:48pm UTC](https://forum.ghost.org/t/all-previously-valid-amp-pages-became-invalid-with-latest-ghost-4-release/20837/4 "2021-03-18T18:48:19Z")

</div>

Hey @DerpyCoder! 👋 We’ve just released the fix for this in 4.1.0, so please go ahead and update with Ghost-CLI 🙂

---

<div class="post-metadata">

### Author: ![DerpyCoder](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/derpycoder/32/11522_2.png) [@DerpyCoder](https://forum.ghost.org/u/DerpyCoder)
#### Post date: [March 19, 2021, 11:07am UTC](https://forum.ghost.org/t/all-previously-valid-amp-pages-became-invalid-with-latest-ghost-4-release/20837/5 "2021-03-19T11:07:19Z")

</div>

Thankfully I’m using Ghost Pro and I don’t have to do anything. 🙃

Thank you @daniellockyer, AMP pages are working without a hitch.

---

<div class="post-metadata">

### Author: ![thewiseoldsage](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/thewiseoldsage/32/10975_2.png) [@thewiseoldsage](https://forum.ghost.org/u/thewiseoldsage)
#### Post date: [March 19, 2021, 4:21pm UTC](https://forum.ghost.org/t/all-previously-valid-amp-pages-became-invalid-with-latest-ghost-4-release/20837/6 "2021-03-19T16:21:17Z")

</div>

Hi,

I’ve today received AMP error messages in search console.

“Only amp-boilerplate and amp-custom ‘style’ tags are allowed, and only in the document head”  
“Referenced AMP URL is self-canonical AMP”

Before updating to 4.0 all AMP pages were fine. Is this related to the above fix? and when will the fix be applied? I’m also on Ghost Pro.

Many thanks.

---

<div class="post-metadata">

### Author: ![DerpyCoder](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/derpycoder/32/11522_2.png) [@DerpyCoder](https://forum.ghost.org/u/DerpyCoder)
#### Post date: [March 20, 2021, 4:58am UTC](https://forum.ghost.org/t/all-previously-valid-amp-pages-became-invalid-with-latest-ghost-4-release/20837/7 "2021-03-20T04:58:28Z")

</div>

I am not seeing such errors in my blog post’s amp views.

Did you modify the amp page?

Try adding `/amp/#development=1` to the end of your blog post and maybe create a separate ticket.
