问题
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