I haven’t looked in detail but it may be because you are missing this from the head section unless I didn’t spot it
<script async custom-element="amp-form" src="https://cdn.ampproject.org/v0/amp-form-0.1.js"></script>
You can put that code in using a simple action in your functions.php file and see it it works or I think you may be able to simply paste the script into the advanced setting box
function amp_header_special() {
echo '<script async custom-element="amp-form" src="https://cdn.ampproject.org/v0/amp-form-0.1.js"></script>';
}
add_action( 'amp_post_template_head', 'amp_header_special');
Then see if the page validates using the AMP validator.
thanks, frenchomatic. Unfortunately, it didn’t make any difference at all, I’ve checked multiple pages.
<script async custom-element="amp-form" src="https://cdn.ampproject.org/v0/amp-form-0.1.js"></script>
Do you guys see this in the header?
-
This reply was modified 7 years, 11 months ago by
frenchomatic.
Moderator
Jan Dembowski
(@jdembowski)
Forum Moderator and Brute Squad
NOTE: If you are not the original poster and you are not helping the original poster, and you are simply replying “I have the same problem” then please don’t.
Start your own support topic instead. You can do so here.
https://wordpress.org/support/plugin/accelerated-mobile-pages/#new-post
This is per the forum guideline.
https://wordpress.org/support/guidelines/#post-in-the-best-place
yes, sure, I checked the actual page afterwards and the script was there. But the validations still fail with the same errors.
Hello @antongorlin,
I have checked the sample page which you have provided and there is no validation error.
Can you please check again.
Please send the exact URL where you are facing this validation error so I can check it.
looks like yesterday’s update fixed all issues. Thanks!
Hi, I have the same issue and it’s not fixed by the update.
Here is the message from the search console : Disallowed attribute in HTML tag ‘FORM [method=POST]’
First detected: 9/7/18
Status: Error
The previous fix didn’t worked neither. Could you help me out please ?
-
This reply was modified 7 years, 5 months ago by
wordp4ln.
Hi @wordp4ln,
Can you share the URL? so that I can check and help you to resolve them.
Hi @wordp4ln,
You are trying to add some form due to which you are facing the validation issues.
Please check where and how you are adding the form and make sure it is compatible with AMP.
AMP has some restrictions on Forms, so you can’t directly add them, you have to add the AMP compatible Forms.
Please check this for more info: https://ampbyexample.com/components/amp-form/
Hello @Marquas,
Thanks for your fast reply. I don’t have much forms on my webpage, I guess just 2 : one for the comments (managed by wpdiscuz) and I don’t think the problem comes from it.
One other form is the newsletter subcription, a widget from mailpoet.
Any advices to help me to debug this ?
Thx !
Hi @wordp4ln,
I think it is due to mailpoet widget, as I said above AMP has some restrictions regarding the Forms. So you have to be sure that forms which you are adding should be according to AMP rules.
So I would suggest you to check if the form is AMP valid or not.