Problem/Motivation
On a basic page I've implemented a form in the body field like the first example on: https://amp.dev/documentation/components/amp-form/.
The page is not valid because the necessary JS is not included. In the AMP Module in amp.libraries.yml i can see both of them. Why is it missing on my AMP page?
There are two different scenarios:
1. /admin/config/services/amp: Basic Page enabled; Manage display -> Field Body: Format „Default“
Steps to reproduce
- Enable and configure AMP module.
- Install AMP Theme and make a copy for a custom AMP subtheme of it.
- Enable subtheme.
- Set up a page with a form in body field like the first example on https://amp.dev/documentation/components/amp-form/.
- View the page.
Result:
- Form is displayed
- Console: "The tag 'form' requires including the 'amp-form' extension JavaScript. (see https://amp.dev/documentation/components/amp-form)"
- Console: „The tag 'template' requires including the 'amp-mustache' extension JavaScript. (see https://amp.dev/documentation/components/amp-mustache)“
2. /admin/config/services/amp: Basic Page enabled; Manage display -> Field Body: Format „AMP Text“
Steps to reproduce
- Enable and configure AMP module.
- Install AMP Theme and make a copy for a custom AMP subtheme of it.
- Enable subtheme.
- Set up a page with a form in body field like the first example on https://amp.dev/documentation/components/amp-form/.
- View the page.
Result:
- Form is not displayed (empty p tag).
- amp-form extension not loaded, but no error message in console
- amp-mustache extension is loaded, warning in console: „The extension 'amp-mustache' is referenced at version '0.1' which is a deprecated version. Please use a more recent version of this extension. This may become an error in the future. (see https://amp.dev/documentation/components/amp-mustache)“
Maybe helpful
- Adding amp-form extension manually to head is working, but Format „AMP Text“ still removes the form element from body field.
- Using a Custom block with the form in it on the basic page works, but amp-mustache is loaded with warning of deprecated version and amp-form is not loaded.
Comments
Comment #2
dp85 commentedUpdated Problem/Motivation and Steps to reproduce.
Comment #3
dp85 commentedUpdated "Maybe helpful".
Comment #4
karens commentedThe deprecated amp-mustache is fixed in dev now, other things still need work.