【问题标题】:RDFa breadcrumb code error possibly due to OGP?可能由于 OGP 导致的 RDFa 面包屑代码错误?
【发布时间】:2015-10-07 17:00:14
【问题描述】:

在验证面包屑的结构化数据实现时遇到一个奇怪的错误。

这是我们用于面包屑的代码:

<header class="breadcrumbs">
    <div xmlns:v="http://rdf.data-vocabulary.org/#">
       <span typeof="v:Breadcrumb">
        <a class="breadcrumbs" href="#" rel="v:url" property="v:title">All Copenhagen Apartments</a> <i class="fa fa-angle-right"></i> 
       </span>
       <span typeof="v:Breadcrumb">
        <a class="breadcrumbs" href="#" rel="v:url" property="v:title">2 bedroom apartments</a> <i class="fa fa-angle-right"></i> 
       </span>
       <span typeof="v:Breadcrumb">
        <a class="breadcrumbs" href="#" rel="v:url" property="v:title">Vanløse</a> <i class="fa fa-angle-right"></i> 
       </span>
       <span typeof="v:Breadcrumb">
        <a class="breadcrumbs" href="#" rel="v:url" property="v:title"><b>Villa Vanløse apartment</b></a>
       </span>
    </div>
</header>

Here 是指向 Google 结构化数据测试工具上的错误的链接。

我得到的错误是:

url [Unspecified type]:

is not a known valid target type for the http://rdf.data-vocabulary.org/#url property.

Screenshot 中还引用了我们头脑中的 OpenGraph 协议 (OGP) 的实现:

<meta property="og:title" content="Copenhagen apartment with balcony and garden"/>
<meta property="og:url" content="http://www.all-copenhagen-apartments.com/villa-vanloese-apartment-cph15/"/>
<meta property="og:image" content="http://www.all-copenhagen-apartments.com/galleri/15/01.jpg"/>
<meta property="og:type" content="product"/>
<meta property="og:site_name" content="all-copenhagen-apartments.com"/>

当我尝试仅验证面包屑代码时,一切看起来都不错,但我不明白为什么面包屑代码和标头中的 OGP 代码之间会出现问题。

【问题讨论】:

    标签: facebook-opengraph rich-snippets rdfa google-rich-snippets structured-data


    【解决方案1】:

    Google 的结构化数据测试工具仅在通过 URL 获取代码时才会出现此错误。如果您通过直接输入来检查相同的代码(例如,通过 URL 检查,然后编辑不相关的内容,然后再次检查),则不会报告错误。

    所以这很可能是工具中的一个错误。

    有人有same problem over on Webmasters SE,Google 员工 John Mueller also thinks 认为这是一个错误。

    【讨论】:

      猜你喜欢
      • 2015-01-25
      • 2018-06-09
      • 2012-01-15
      • 1970-01-01
      • 1970-01-01
      • 2018-08-11
      • 2020-03-19
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多