• Hi everybody

    the videos are not showing,I’m getting an error using validator.ampproject with the output:

    “The tag ‘amp’ is disallowed.”

    digging to the code I can see in the post
    [embed]https://www.youtube.com/watch?v=xxxxxx[/embed]
    was render to
    <amp data-videoid=”xxxxx” layout=”responsive” width=”1000″ height=”563″></amp>
    and not using the youtube amp tag <amp-youtube>

    in fact I inspected the page and replace <amp> tag for <amp-youtube> in the DOM and it works in the validators and it shows the video..it’s the only thing the I need

    How can I replace that tag ?

    I haven’t seen anything on the setting where I can deal with it, I don’t know if this is a bug or something that can be fix on the settings

    Cheers

Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Contributor ampforwp

    (@ampforwp)

    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.

    Thread Starter marcogomesr

    (@marcogomesr)

    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?

    Plugin Contributor ampforwp

    (@ampforwp)

    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.
Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘[embed][/embed] shortcut isn’t embedding to’ is closed to new replies.