【问题标题】:Invalid object type for field "location"字段“位置”的对象类型无效
【发布时间】:2022-10-14 00:18:05
【问题描述】:

我们正在处理结构化数据并将其插入到网站标题中。在 Schema[.]org 上没有错误。但是在谷歌搜索控制台上,它显示“字段“位置”的对象类型无效。为什么会这样?检查了谷歌的事件结构化数据指南,我们认为它是正确的。谷歌搜索控制台仍然坚持存在。这是我们插入的方式位置部分:

"location": {
    "@type": "VirtualLocation",
    "url": "https://oursite.com/eventpage/"
  },

任何人都可以帮助我吗?

【问题讨论】:

    标签: wordpress events schema structured-data


    【解决方案1】:

    遇到同样的问题并添加:

    "eventAttendanceMode": "https://schema.org/OnlineEventAttendanceMode"
    

    到该位置上方的 json+ld 最终修复了错误消息。所以你应该有类似的东西:

    ...json+ld markup...
    "eventAttendanceMode": "https://schema.org/OnlineEventAttendanceMode",
      "location": {
        "@type": "VirtualLocation",
        "url": "https://operaonline.stream5.com/"
        },
    ...json+ld markup...
    

    如果省略 eventAttendanceMode 属性或使用错误的值(例如 OfflineEventAttendanceMode),则会引发该错误,因此请确保将其设置为 OnlineEventAttendanceMode

    【讨论】:

      猜你喜欢
      • 2022-07-28
      • 2012-09-23
      • 2019-12-12
      • 1970-01-01
      • 2018-06-01
      • 2021-07-01
      • 2019-07-03
      • 2018-03-11
      • 2010-12-22
      相关资源
      最近更新 更多