gpt4 book ai didi

schema.org - "The attribute publisher.itemtype has an invalid value"

转载 作者:行者123 更新时间:2023-12-04 09:39:09 26 4
gpt4 key购买 nike

我是新来的代码。我正在尝试在我的联系页面上为 Google 评论添加结构化数据代码:

http://www.catnips.co.uk/in-home-mobile-cat-groomer-feline-behaviourist.html

我正在使用来自我的 Google map 客户评论的评论。

在谷歌结构化数据测试工具中测试它,它说

The attribute publisher.itemtype has an invalid value.



我无法弄清楚我做错了什么。
<div itemprop="review" itemscope itemtype="http://schema.org/Review">
<meta itemprop="author" content="Anita Kelsey">

<strong itemprop="itemreviewed">Mobile Cat Grooming</strong> by <a href="https://www.google.co.uk/maps/place/The+Notting+Hill+Cat+Sitting+and+Cat+Grooming+Company/@51.5254631,-0.2526499,12z/data=!4m10!1m2!2m1!1smobile+cat+grooming!3m6!1s0x4876101c4f92036d:0x8514584f53249c41!8m2!3d51.5180716!4d-0.2036502!9m1!1b1/">Jen Crothers</a><br />

<strong>My Rating:</strong> <span itemprop="reviewRating" itemscope itemtype="http://schema.org/Rating"><img src="http://www.catnips.co.uk/wp-content/uploads/2014/09/5-stars-356x73.png" alt="5 stars" width="356" height="73" class="alignnone size-medium wp-image-4614" /><meta itemprop="ratingValue" content="5" /><meta itemprop="bestRating" content="5" /></span>
</div>

<span itemprop="reviewRating" itemscope itemtype="http://schema.org/Rating">

Anita was absolutely brilliant with my Persian cat Ernie, who was a wriggly customer at times. She skillfully and gently removed the mats on his coat and gave him a very thorough groom. Brilliant, professional and easily a five star service provided from start to finish.
<meta itemprop="ratingValue" content="5" /><meta itemprop="bestRating" content="5" />

最佳答案

错误不在您在问题正文中提供的代码中,而是在 JSON-LD 中。在结构化数据测试工具中,您可以单击错误以转到导致错误的代码行。这有助于您确定导致问题的原因。



该错误通知您您为发布商属性提供的项目类型无效。虽然 schema.org 确实支持类型 Personpublisher Article 的属性(property),谷歌没有。 Google 仅支持 Organization ,而不是 Person,作为发布者属性的类型,如 Articles Structured Data 中所述Google Developers 上的页面。

关于schema.org - "The attribute publisher.itemtype has an invalid value",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/40565885/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com