Missing Video URLs
-
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]
-
@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>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!
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 -->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.
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 ofdata-videoidin the AMP plugin is for constructing theamp-youtubeelement:But I don’t know why this
amp-youtubeelement on your system, unless…Only thing I could think of is that you may have some
force_balance_tagslogic being run onthe_contentand this could be corrupting the tag.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.
What plugins do you have active?
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?
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.
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.
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.
I don’t see any structured data issues with the above URL:
-
This reply was modified 6 years, 10 months ago by
The topic ‘Missing Video URLs’ is closed to new replies.