CMS Development

ericthomas
Contributor

Trying to add schema markup to video. ThumnailUrl not working.

I am trying to add schema.org markup for the videos on my FAQ page. I added markup to the html of my custom FAQ module. It's working fine, except that when I validate the code with Google, it's showing that the URL for the "ThumbnailURL" field is blank.

 

My custom module has an Image field, where I've uploaded a thumbnail for each video.  I thought this HUBL would work to print the image URL in the appropriate place. Is my syntax wrong? Thank you for any help you can give.

 

<div itemprop="VideoObject" itemscope itemtype="http://schema.org/VideoObject">

<div class="video-popup">
<video width="100%" height="55%" controls="controls"><source src="{{item.video}}" type="video/mp4"/>Your browser does not support HTML5 video. Please update your browser to view this media content.</video>
</div>

<span itemprop="thumbnailUrl" content="{{ item.image.src }}"></span>
<span itemprop="description" content="{{ item.answer }}"></span>
<span itemprop="uploadDate" content="2019-04-21"></span> 
<span itemprop="name" content="{{ item.question }}"></span>
</div>
0 Upvotes
4 Replies 4
BenSBM
Contributor | Elite Partner
Contributor | Elite Partner

Trying to add schema markup to video. ThumnailUrl not working.

Hi @ericthomas 

 

The syntax looks correct at first glance, and looking on your page the other fields do seem to be displaying properly.

 

My first thought would be to double check that the image field name is indeed simply "image". If it is, it might be helpful to just print out the {{ item.image }} field to see what is being output.

 

Hopefully those first couple of simple steps can help point you in the right direction. Let me know if that works out for you, or if you have any new info you can provide after trying those steps.

0 Upvotes
ericthomas
Contributor

Trying to add schema markup to video. ThumnailUrl not working.

Thanks for your suggestions. I double checked that the image field name is simply "image," and I think it is:

 

Hubspot FAQ Module.JPG

 

If I remove the .src and just print {{ item.image }}, it still prints a blank "". 

 

Thanks again for your help.

 

0 Upvotes
BenSBM
Contributor | Elite Partner
Contributor | Elite Partner

Trying to add schema markup to video. ThumnailUrl not working.

That certainly looks like it should work. A couple more troublshooting possibilities would be to check that the module html, just above the cutoff in the screenshot you provided, does have the proper for loop syntax for a repeater - which I assume it would since the other fields are outputting their values. Next would be that the page has the image value set?

 

One last test, what do you get when you output simply {{ item }} ?

ericthomas
Contributor

Trying to add schema markup to video. ThumnailUrl not working.

Thanks. I'll try to check those things. 

 

I haven't tried choosing images for each of the FAQ modules on the page. I was assuming it would just pull the default image from the module.

 

BTW, I just realized you are from Smart Bug. You guys built this module and our site! Thanks for the support!

0 Upvotes