Hello @marcogomesr
Can you please send me the exact URL where you are facing this validation issue so I can check it, will solve it for you.
there is any email
where I can forward to you @ampforwp?
Thanks
-
This reply was modified 5 years, 11 months ago by marcogomesr.
I think it is team@magazine3.com – you are correct about the embedding of youtube videos. I had exactly the same problem with standard iframe embeds from youtube until I used <amp-youtube> and the validation errors went away.
We’ve seen this issue as well when trying to add videos.
@frenchomatic, you mention that you “used <amp-youtube>”. Did you have any successes getting this to work when adding a video via the CMS?
We tried some default themes that came with this plugin but still wrongly converts to [embed] short-code.
Anyone else getting this problem?
Yes, when using the embed option it gives the error at the top of the edit page of
Warning: There is content which fails AMP validation; it will be stripped when served as AMP. Debug
Invalid elements: amp-vimeo
For my case we are using vimeo. Should we be uploading directly to the website to avoid this issue?
Hello @websitegeni
Can you please share the URL of the page or any screenshot of the issue you are facing so I can check it?
For pages/posts you need to do two things.
Firstly you need to embed the amp youtube script into the head – you can do that in an number of ways:
Via functions.php on a per page basis (gets a bit messy to conditionally test what page you are on). If you are in genesis you can actually put it into specific pages with the admin panel that genesis provides for adding header scripts per page. You will still need to add an action in functions.php so header scripts always get included but you only have to do it once and it will automatically look after all pages. You don’t need to test what page you are on using coding.
Alternatively you can put it onto every page via the plugin’s admin. That is the simplest but less efficient way to do it.
<script async custom-element="amp-youtube" src="https://cdn.ampproject.org/v0/amp-youtube-0.1.js"></script>
Then I create a custom amp page using the plugin editor or if in AMP takeover that isn’t necessary at all. You include your youtube video like this
<amp-youtube width="1280"
height="720"
layout="responsive"
data-videoid="SNkkm0zDK3Q">
</amp-youtube>
This isn’t going to be a nice solution if you have hundreds of videos but if you only have a few then it is no big deal.
-
This reply was modified 5 years, 11 months ago by frenchomatic.
-
This reply was modified 5 years, 11 months ago by frenchomatic.
-
This reply was modified 5 years, 11 months ago by frenchomatic.