• Recently, the search console threw an error “Missing Video URL”. I have embedded this video using Youtube block from Gutenberg and still, it is not getting visible in the AMP version of the page.

    I’ve checked in inspect the element in the browser and found video URL empty. https://screenpresso.com/=XYIud

    On the other hand, video is visible on the non-AMP version. I even have checked the browser console log and found no error. It seems plugin is acting weird.

    Kindly look into the issue ASAP.

    Thank you in advance.

    The page I need help with: [log in to see the link]

Viewing 15 replies - 1 through 15 (of 20 total)
  • @mayankmajeji Do you have any other YouTube plugin, such as YouTube Embed plus? Some plugins add additional YouTube video blocks to the Gutenburg editor.

    If you click on “Edit as HTML” within that block and share the code we can inspect further. The code should look something similar to the below:

    <figure class="wp-block-embed-youtube wp-block-embed is-type-video is-provider-youtube wp-embed-aspect-4-3 wp-has-aspect-ratio"><div class="wp-block-embed__wrapper">
    https://www.youtube.com/watch?v=XXXXXXXXXXX
    </div></figure>
    Thread Starter Mayank Majeji

    (@mayankmajeji)

    Hi James,

    I don’t use any third-party plugin but only rely on Gutenberg YouTube block.

    This is the code I found when switched to Edit to HTML –

    <figure class=”wp-block-embed-youtube wp-block-embed is-type-video is-provider-youtube wp-embed-aspect-16-9 wp-has-aspect-ratio”><div class=”wp-block-embed__wrapper”>

    </div></figure>

    The only thing I suspect is aspect ratio class.

    Let me know if you can figure out anything else.

    Thank you!

    Plugin Author Weston Ruter

    (@westonruter)

    If you are seeing this code when you click “Code Editor” then I don’t think you are using the Gutenberg block here.

    If I view the code editor it appears as:

    <!-- wp:core-embed/youtube {"url":"https://www.youtube.com/watch?v=QtI3eU_WuF4","type":"video","providerNameSlug":"youtube","className":"wp-embed-aspect-16-9 wp-has-aspect-ratio"} -->
    <figure class="wp-block-embed-youtube wp-block-embed is-type-video is-provider-youtube wp-embed-aspect-16-9 wp-has-aspect-ratio"><div class="wp-block-embed__wrapper">
    
    </div></figure>
    <!-- /wp:core-embed/youtube -->
    Plugin Author Weston Ruter

    (@westonruter)

    Nevermind. I see that you are accessing it via the Edit as HTML in the block context menu, not the Code Editor for the entire post.

    Plugin Author Weston Ruter

    (@westonruter)

    The video in the AMP version is getting output on your system as:

    <figure class="wp-block-embed-youtube wp-block-embed is-type-video is-provider-youtube  wp-has-aspect-ratio"><div class="wp-block-embed__wrapper">
    <a target="_blank" data-videoid="QtI3eU_WuF4">
    </a></div></figure><p>

    The <a target="_blank" data-videoid="QtI3eU_WuF4"></a> here is strange. The only use of data-videoid in the AMP plugin is for constructing the amp-youtube element:

    https://github.com/ampproject/amp-wp/blob/8f2a1cd69f37bb645d9876b8185cc712d8fe440c/includes/embeds/class-amp-youtube-embed.php#L136-L144

    But I don’t know why this amp-youtube element on your system, unless…

    Plugin Author Weston Ruter

    (@westonruter)

    Only thing I could think of is that you may have some force_balance_tags logic being run on the_content and this could be corrupting the tag.

    See also https://github.com/ampproject/amp-wp/issues/2156

    Thread Starter Mayank Majeji

    (@mayankmajeji)

    Hi Weston,

    I’ve re-tried embedding the video with a new youtube Gutenberg block and it is generating the same figure tag in the HTML.

    Secondly, I am pretty sure that I have not used “force_balance_tags” to filter out the_content because it is a custom theme I’ve developed for my website.

    I am not sure if anything else is creating a conflict.

    • This reply was modified 6 years, 10 months ago by Mayank Majeji.
    Plugin Author Weston Ruter

    (@westonruter)

    What plugins do you have active?

    Thread Starter Mayank Majeji

    (@mayankmajeji)

    Apart from AMP, I’ve common plugins like Yoast, Contact Form 7, Akismet and few others.

    But I don’t think any of them are creating a conflict with the default Gutenberg block.

    @mayankmajeji Are you using any optimisation or caching plugins? Some such plugins include options that can alter YouTube embeds such as WP Rocket.

    In additional do you have a staging site setup to check with different theme?

    Thread Starter Mayank Majeji

    (@mayankmajeji)

    Yes, I am using WP Rocket. But I’ve not selected the “Disable WordPress Embed” Option.

    It’s allowing me to embed it on the desktop and only skipping it on mobile. I don’t think WP Rocket is creating an issue here. Otherwise, the video would not be visible on both the devices.

    @mayankmajeji Are you able to setup a staging site and check with an alternate theme?

    Please inform me what other plugins you are using, other that those you have already listed & WP Rocket.

    Thread Starter Mayank Majeji

    (@mayankmajeji)

    AMP Plugin is certainly causing more problems apart from this one, not it’s displaying “Error in required structured data element” for https://themaverickspirit.com/wp-rocket-cache-plugin-review/amp/

    And the great thing is, it’s not even displaying the error so that I can troubleshoot it.

    Thread Starter Mayank Majeji

    (@mayankmajeji)

    I even tested the URL on Structured Data Testing Tool and it says there’s no error in the code. What should I do when 1 tool is saying there an error and other’s giving a clean chit. Both the tools belong to Google. If I didn’t find any solution, I am afraid I have to switch to a different plugin.

    Plugin Author Weston Ruter

    (@westonruter)

Viewing 15 replies - 1 through 15 (of 20 total)

The topic ‘Missing Video URLs’ is closed to new replies.