2

I put some effort in marking up an ancient message board with schema.org/UserComments microdata. Testing it in WMT yields an error message: Missing required field "dtstart".

Here’s an item, and apart from the table markup, I think it’s all fine:

<tr itemscope itemtype="http://schema.org/UserComments" itemprop="comment">
    <td>
        <meta content="2013-09-23T17:39:14+01:00" itemprop="commentTime">
        <meta content="http://example.com/cmts/?id=321" itemprop="replyToUrl">
        <meta content="comment’s title" itemprop="name">
        <div itemscope itemtype="http://schema.org/Person" itemprop="creator">
            <a itemprop="url" href="http://www.example.com/user/Nickname">
            <img itemprop="image" src="http://cdn.example.com/pic.jpg">
            <span itemprop="name">Nickname</span>
        </div>
    </td>
    <td>
        <p itemprop="commentText">the comment’s actual text</p>
    </td>
</tr>

In UserComments, there’s no field named “dtstart”. In a similiar, yet not helpful question, there’s another link to WMT, stating somewhat implicit that startDate and dtstart are synonyms. This does not prove true, at least not for UserComments.

Is it a hitch at Google, so I can disregard it? Am I missing some point (datetime instead of content)?

Community
  • 1
  • 1
dakab
  • 5,379
  • 9
  • 43
  • 67

1 Answers1

1

Your Microdata and Schema.org usage is correct. They don’t define any required properties. So when the Google Structured Data Testing Tool reports "Missing required …" errors, it only means that Google (probably) won’t consider displaying a Rich Snippet when specific properties are missing.

When testing your snippet with a parent item for the comment property, no errors are reported, e.g.:

<article itemscope itemtype="http://schema.org/CreativeWork">
  <table>
  <!-- your tr here -->
  </table>
</article>

Another solution: adding a startDate property (but Google might want to see a date from the future here.)

(The term "dtstart" probably comes from the data-vocabulary.org vocabulary, where Google required this property for the Event Rich Snippet. And Schema.org’s UserComments is also some kind of Event, see notes below.)

If you don’t care about Google’s Rich Snippets, you can keep it like that.


Notes about your snippet:

  • You might want to use Comment instead of UserComments (because the latter one is an Event, not a CreativeWork).
    However, currently, the comment property expects UserComments, but this will most likely change in one of the next Schema.org updates.
  • For specifying replyToUrl, you must use link instead of meta.
Community
  • 1
  • 1
unor
  • 92,415
  • 26
  • 211
  • 360
  • Thank you very much, that was concise in detail. Google’s cognition of microdata is actually something I do care about. Regarding the usage of `Comment`, I’ll wait and see, since schema.org/Comment is not that descriptive right now. As for `link` elements, I thought they “may only appear in the HEAD section of a document”. Anyway, the superordinate `CreativeWork` solved the actual problem. – dakab Apr 04 '14 at 06:01
  • dtstart actually comes from vcalendar http://www.kanzaki.com/docs/ical/dtstart.html – albert Sep 01 '16 at 00:50