2015-09-14 20 views
11

我有一個問題:谷歌的結構化數據測試工具給我一個錯誤:「產品列表」項目所需的「位置」屬性?

Tag position doesn't exist. It's required.

Tag position doesn't exist

我將它添加到標記。比我得到這個錯誤:

Position property is not valid for an object of type Product

Position property is not valid for an object of type Product

這裏是我的標記:

<table id="sale_table" itemscope="" itemtype="http://schema.org/ItemList"> 
    <tbody> 
      <tr itemprop="itemListElement" itemscope="" itemtype="http://schema.org/Product"> 
       <td class="sale_art_td" itemprop="productID">10496278</td> 
       <td class="sale_brand_td" itemprop="brand"><span itemprop="name ">--</span></td> 
       <td class="sale_name_td" itemprop="name">10496278/Крышка трамблера Daewoo Nexia,Espero DD</td> 
       <td class="sale_am_td">1.00</td> 
       <td class="sale_price_td" itemprop="offers" itemscope="" itemtype="http://schema.org/Offer"><meta itemprop="priceCurrency" content="RUR"><span itemprop="price">341.50</span></td> 
       <td class="sale_buy_td"><a href="javascript:void(0);" class="sale_buy_link" data-id="63455914" data-query="10496278">Купить</a><!--<img src="/upload/badge/sale_cart.png" />--></td> 
       <td class="hidden"> 
        <meta itemprop="url" content="/partsearch/?q=10496278"> 
             <span itemprop="description">Распродажа: 10496278/Крышка трамблера Daewoo Nexia,Espero DD по цене 341.50</span> 
       </td> 
      </tr> 
        <tr itemprop="itemListElement" itemscope="" itemtype="http://schema.org/Product"> 
       <td class="sale_art_td" itemprop="productID">76202sx0a12</td> 
       <td class="sale_brand_td" itemprop="brand"><span itemprop="name ">HONDA</span></td> 
       <td class="sale_name_td" itemprop="name">76202SX0A12</td> 
       <td class="sale_am_td">1.00</td> 
       <td class="sale_price_td" itemprop="offers" itemscope="" itemtype="http://schema.org/Offer"><meta itemprop="priceCurrency" content="RUR"><span itemprop="price">704.00</span></td> 
       <td class="sale_buy_td"><a href="javascript:void(0);" class="sale_buy_link" data-id="63456060" data-query="76202sx0a12">Купить</a><!--<img src="/upload/badge/sale_cart.png" />--></td> 
       <td class="hidden"> 
        <meta itemprop="url" content="/partsearch/?q=76202sx0a12"> 
             <span itemprop="description">Распродажа: 76202SX0A12 по цене 704.00</span> 
       </td> 
      </tr> 
    </tbody> 
</table> 
+0

這是一個已經過了一年,我們仍然不知道它是什麼。 – OdraEncoded

回答

2

這不是你的代碼中的錯誤。這僅表示除非您提供此屬性,否則Google不會顯示某個Rich Snippet(或類似功能)。

但是,position property未被定義爲Product type,所以這沒有任何意義。

看起來這是來自Google的新的結構化數據功能,目前還沒有文檔記錄,因爲它鏈接到404頁面:List Page Carousels。也許這是一項正在進行的工作,但他們並不意味着在他們的測試工具中發佈支票。

所以我現在簡單地忽略它。

+0

單詞「必需」,這就是我迷惑=) – murrometz

3

我想這是由非明確的文檔對谷歌的側實現錯誤:

https://schema.org/itemListElement明確規定

Existing entities are best for a simple, unordered list of existing things in your data. ListItem is used with ordered lists when you want to provide additional context about the element in that list or when the same item might be in different places in different lists.

Note: The order of elements in your mark-up is not sufficient for indicating the order or elements. Use ListItem with a 'position' property in such cases.

同時是說值預計這些類型之一是:

  • ListItem
  • 文本
  • 事情

=>這意味着隱含,該位置元件可以僅需要爲有序列表,這又需求,所述事件包含在列表項元件內部,它提供了itemprop 的位置

這也意味着隱含,如果ItemListElement文本事情,清單應考慮無序

這是文檔有意義的唯一方法。我認爲隱含的連接錯過了。

所以我想適當的行動是將文件的結構化數據測試工具一個bug報告,並警告住現在產品一個列表項元素作爲解決方法裏面。

+1

我自己嘗試瞭解決方法,但似乎並不奏效: - 如果我將產品嵌套在ListItem元素中,WMT會抱怨錯誤的對象類型 - If我使用_Thing_它抱怨_谷歌對於Thing_類型的對象無法識別屬性xyz。 - 如果我使用_ListItem_或_Thing_元素嘗試_additionalType:\t http://schema.org/Product_,則會發生同樣的情況。 ==>我無法找到_Product_列表的有效編碼。 –

+0

我有同樣的問題。但不知道它是否在測試工具或其他東西中有錯誤。如果它是一個錯誤,那麼谷歌會修復它?我可以看到這個帖子已經有一年多了,但是這個bug仍然存在。 2017 – Majid

+0

並且它仍然不固定... – SublymeRick

1

試試這個

'@type': 'ListItem', 
'position': 1, 
'item':{ 
    '@type': 'Product', 
... product props 
} 
1

從我的測試malefique是在正確的解決方案。

此代碼完全驗證使用Structured Data testing tool

{ 
    "@context": "http://schema.org", 
    "@type": "ItemList", 
    "itemListOrder": "http://schema.org/ItemListOrderDescending", 
    "itemListElement": [ 
     { 
      "@type": "ListItem", 
      "position": 1, 
      "item": { 
       "@type": "Product", 
       "name": "My product", 
       "url": "www.example.com", 
       "offers": { 
        "@type": "Offer", 
        "availability": "http://schema.org/InStock", 
        "price": "100.00", 
        "priceCurrency": "AUD" 
       } 
      } 
     } 
    ] 
} 
相關問題