Fix Structured Data Errors including image url, mainEntityOfPage etc in Blogger Some one reported me about new error showing in their website while testing in Structured Data Testing Tool . First I ignored but when I tes...
2018-07-31T07:44:57Z

Fix Structured Data Errors including image url, mainEntityOfPage etc in Blogger

Some one reported me about new error showing in their website while testing in Structured Data Testing Tool. First I ignored but when I test my blog in it I found that there is so many errors exist in my website but now all are fixed. To fix this I tested Google Sites to check the error exist or not and you don't believe me they have also same error exist. But I solved all the issue after so many trail and error, and make a list of all Errors and the Basic Requirement for the Structured Data Testing Tool.

Fix Structured Data Errors

First go and check your website errors in the tool from Google called, "Structured Data Testing Tool" and and if you find any error just follow the tutorial for your website errors. If your error is not available here just comment it out I will try to cover it in my tutorial
  • The property image_url is not recognized by Google for an object of type BlogPosting.
  • The property blogId is not recognized by Google for an object of type BlogPosting.
  • The property postId is not recognized by Google for an object of type BlogPosting.
  • A value for the headline field is required.
  • A value for the image field is required.
  • A value for the publisher field is required.
  • The dateModified field is recommended. Please provide a value if available.
  • The mainEntityOfPage field is recommended. Please provide a value if available.

Basic Requirement

<div itemscope itemtype="http://schema.org/BlogPosting">
  <meta itemscope itemprop="mainEntityOfPage"  itemType="https://schema.org/WebPage" itemid="https://google.com/article"/>
  <h2 itemprop="headline">Article headline</h2>
  <h3 itemprop="author" itemscope itemtype="https://schema.org/Person">
    By <span itemprop="name">John Doe</span>
  </h3>
  <span itemprop="description">A most wonderful article</span>
  <div itemprop="image" itemscope itemtype="https://schema.org/ImageObject">
    <img src="https://google.com/thumbnail1.jpg"/>
    <meta itemprop="url" content="https://google.com/thumbnail1.jpg">
    <meta itemprop="width" content="800">
    <meta itemprop="height" content="800">
  </div>
  <div itemprop="publisher" itemscope itemtype="https://schema.org/Organization">
    <div itemprop="logo" itemscope itemtype="https://schema.org/ImageObject">
      <img src="https://google.com/logo.jpg"/>
      <meta itemprop="url" content="https://google.com/logo.jpg">
      <meta itemprop="width" content="600">
      <meta itemprop="height" content="60">
    </div>
    <meta itemprop="name" content="Google">
  </div>
  <meta itemprop="datePublished" content="2015-02-05T08:00:00+08:00"/>
  <meta itemprop="dateModified" content="2015-02-05T09:20:00+08:00"/>
</div>

So I read all the documentation to solve all the errors. You can read below the tutorial how I solve all these problem one by one.
Note:
  • Before Doing this Backup your Template
  • Go to Blogger Dashboard >>Template >> Edit HTML
  • For all this tutorial you have to stay in the code editor in blogger.
  • Don't try to search all at once search one code i.e. in first case search(Ctrl + F) for data:post.thumbnailUrl you will get all the code.

The property image_url is not recognized by Google for an object of type BlogPosting.

Find this in your code editor and remove this entirely(It may appear 2 time in your template)
<b:if cond='data:post.thumbnailUrl'>
   <meta expr:content='data:post.thumbnailUrl' itemprop='image_url'/>
</b:if>

The property blogId is not recognized by Google for an object of type BlogPosting.

Find this in your code editor and remove this entirely(It may appear two time in your template)
<meta expr:content='data:blog.blogId' itemprop='blogId'/>

The property postId is not recognized by Google for an object of type BlogPosting.

Find this in your code editor and remove this entirely(It may appear two time in your template)
<meta expr:content='data:post.id' itemprop='postId'/>

A value for the headline field is required.

Find this code in your code editor (It may appear two time in your template)
<h3 class='post-title entry-title' itemprop='name'>
replace with this tag
<h3 class='post-title entry-title' itemprop='headline'>

A value for the image field is required.

Find this tag(Don't remove it)
<data:post.body/>
paste these below code after the <data:post.body/> tag(This tag may appear two or three time)
<div itemprop='image' itemscope='itemscope' itemtype='https://schema.org/ImageObject'>
   <b:if cond='data:post.firstImageUrl'>
    <img style='display:none;' expr:src='data:post.firstImageUrl'/>
     <meta itemprop='url' expr:content='data:post.firstImageUrl'/>
  </b:if>
    <meta itemprop='width' content='800'/>
    <meta itemprop='height' content='800'/>
</div>
You can set image height and width, only change 800 to any other number.

A value for the publisher field is required.

Find this tag(Don't remove it)
<data:post.body/>
paste these below code after the <data:post.body/> tag(This tag may appear two or three time)
<div itemprop='publisher' itemscope='itemscope' itemtype='https://schema.org/Organization'>
    <div itemprop='logo' itemscope='itemscope' itemtype='https://schema.org/ImageObject'>
      <img style='display:none;' src='http://4.bp.blogspot.com/-3qEtsw1yqO0/VnZ0534tHjI/AAAAAAAADGQ/AYOyXnnLibY/s1600/Solvelogger-logo.png'/>
      <meta itemprop='url' content='http://4.bp.blogspot.com/-3qEtsw1yqO0/VnZ0534tHjI/AAAAAAAADGQ/AYOyXnnLibY/s1600/Solvelogger-logo.png'/>
      <meta itemprop='width' content='600'/>
      <meta itemprop='height' content='60'/>
    </div>
    <meta itemprop='name' expr:content='data:blog.title'/>
</div>
  • Change the red colored highlighted image link with your logo image link
  • Change height and weight with any number

The dateModified field is recommended. Please provide a value if available.

Find this tag
<div class='post hentry uncustomized-post-template' itemprop='blogPost' itemscope='itemscope' itemtype='http://schema.org/BlogPosting'>
and paste these code after above tag
<meta expr:content='data:post.timestamp' itemprop='datePublished'/>
<meta expr:content='data:post.lastUpdatedISO8601' itemprop='dateModified'/>

The mainEntityOfPage field is recommended. Please provide a value if available.

Find this tag
<div class='post hentry uncustomized-post-template' itemprop='blogPost' itemscope='itemscope' itemtype='http://schema.org/BlogPosting'>
and replace the code with this
<div class='post hentry uncustomized-post-template' itemscope='itemscope' itemtype='http://schema.org/BlogPosting'>
<meta itemscope='itemscope' itemprop='mainEntityOfPage'  itemType='https://schema.org/WebPage' expr:itemid='data:post.link ? data:post.link : data:post.url'/>
If error url missing add this after above code.
<meta expr:content='data:post.canonicalUrl' itemprop='url'/>

If you liked this article, then please subscribe to our blog for more blogger tutorials.
Share it:

Blogger

Blogging

Troubleshooting

Post A Comment:

0 comments: