大网数据广告活动
网站运营与故障问答

Rich Snippets error: missing required field "name (fn)" when "fn" is defined

· 52CE 我爱测

I'm getting these errors with Google Structured Data Testing Tool: Error: At least one field must be set for Hcard. Error: Missing required field "name (fn)". but the fn field is set. Also vcard : <span class="vcard author"> <a c…

问题原文

原帖链接 · Manolo · CC BY-SA 3.0

I'm getting these errors with Google Structured Data Testing Tool:

Error: At least one field must be set for Hcard.

Error: Missing required field "name (fn)".

but the fn field is set. Also vcard:

<span class="vcard author">
    <a class="url fn n" href="http://www.nosabesnada.com/author/smiranda/" title="Posts by Sandra" rel="author">Sandra</a>
</span>

I've followed some tutorials and tried some combination, but nothing seems to work.

Any idea of what I am doing wrong?

已采纳解答

原帖链接 · dasickle · CC BY-SA 3.0

Try the following:

<span class="vcard author">
<a rel="author" title="author profile" href="http://example.com/author/name/">
<span class="fn author">Author Name</span>
</a>
</span>

You need to add class="fn author" in the second span tag.

After you update the code go and test it out.

Your errors should go away gradually within a week or so.

摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。

资料来源与适用范围

资料来源
Webmasters Stack Exchange
适用范围
以原帖系统、软件版本与发布日期为准(2014-10-08)
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY-SA 3.0

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。