Not a valid AMP page

Created on 25 January 2021, almost 4 years ago
Updated 24 June 2023, over 1 year ago

Problem/Motivation

Enabled AMP and tested using google, got structure errors:
a. The mandatory tag 'amphtml engine script' is missing or incorrect.
b. script src="//cdn.ampproject.org/v0.js" async> c. The author stylesheet specified in tag 'style amp-custom' is too long - document contains 159293 bytes whereas the limit is 75000 bytes.
d. The tag 'img' may only appear as a descendant of tag 'noscript'. Did you mean 'amp-img'?

How to fix these?

πŸ’¬ Support request
Status

Active

Version

3.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States je1

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • Google amp validator seems to want absolute urls in the

    tags. For example: <script src="//cdn.ampproject.org/v0.js" async></script> is invalid but <script src="https://cdn.ampproject.org/v0.js" async></script> is valid. This is a show-stopped. Seems to be a normal behaviour of drupal libraries to render it that way even when the protocol is stated.
    js:
        https://cdn.ampproject.org/v0.js: { type: external, minified: true, attributes: { async: true } }
Production build 0.71.5 2024