产品的丰富代码段/微数据:错误:schema.org的微数据不完整 [英] Rich Snippets / Micro Data for Products: Error: Incomplete microdata with schema.org
问题描述
我收到错误:schema.org中的微数据不完整".使用Google测试工具测试标记时出现的提示消息( http://www.google .com/webmasters/tools/richsnippets?q = uploaded:8004e2bf685980a2f0ffadd5c52b2d5f ).
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.
提前谢谢!
<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>
推荐答案
由于您错过了第二个要约的价格,因此触发了这种神秘错误.以下标记对我来说没有错误:
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.
这篇关于产品的丰富代码段/微数据:错误:schema.org的微数据不完整的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!