Rich Snippets / Micro Data for Products: Error: Incomplete microdata with schema.org

喜夏-厌秋 提交于 2019-12-23 20:09:32

问题


I'm getting an 'Error: Incomplete microdata with schema.org.' message when testing the markup with Google's testing tool (http://www.google.com/webmasters/tools/richsnippets?q=uploaded:8004e2bf685980a2f0ffadd5c52b2d5f).

I've simplified my code as much as possible, am I missing a certain 'required' type to get rid of this error? This is the only data I have available on my product pages at the moment.

Thanks in advance!

<div itemscope itemtype="http://schema.org/Product" id="productdetail">
<img itemprop="image" src="testimage.jpg" width="300" height="300" name="multi" alt="Test" />
<h1 itemprop="name">Product Name</h1>
<span itemprop="offers" itemscope itemtype="http://schema.org/Offer" class="convertprice">
    <span itemprop="price">£2.00</span>
</span>
<p itemprop="offers" itemscope itemtype="http://schema.org/Offer" class="stock"><link itemprop="availability" href="http://schema.org/InStock" content="In Stock" />In Stock</p>
<div class="tab_info" id="tab1">
    <p itemprop="description" class="invtdesc2">This is where the product description will be!</p>
</div>


回答1:


Looks like this cryptic error is triggered because you're missing a price on the 2nd Offer. The following markup works without errors for me:

<div itemscope itemtype="http://schema.org/Product" id="productdetail">
    <img itemprop="image" src="testimage.jpg" width="300" height="300" name="multi" alt="Test" />
    <h1 itemprop="name">Product Name</h1>
    <span itemprop="offers" itemscope itemtype="http://schema.org/Offer" class="convertprice">
        <span itemprop="price">£2.00</span>
    </span>
    <p itemprop="offers" itemscope itemtype="http://schema.org/Offer" class="stock">
    <span itemprop="price">£2.00</span><link itemprop="availability" href="http://schema.org/InStock" content="In Stock" />In Stock</p>
    <div class="tab_info" id="tab1">
        <p itemprop="description" class="invtdesc2">This is where the product description will be!</p>
    </div>
</div>

We're working on giving more informative error messages. Thanks for pointing this out.



来源:https://stackoverflow.com/questions/17955572/rich-snippets-micro-data-for-products-error-incomplete-microdata-with-schema

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!