Sas Sam
Sas Sam

Reputation: 691

Microdata (schema.org) - Event - empty startDate

Could anyone tell me what if the EducationEvent has not got startDate and endDate, because it is not known yet? If I set an empty value for it ($startIso is an empty string):

<meta itemprop="startDate" content="{{ $startIso }}" />

I get:

Error: Missing required field "dtstart".` error message in validator.

Here’s the code:

    <div itemscope itemtype="http://schema.org/EducationEvent">
      <h1 class="columns">
          <span itemprop="name">{{ $courseTypesDescription->course_type_name }}</span>
      </h1>

      <div class="dates columns">
        <div class="row">
          <div class="large-5 medium-6 columns">
            @if ($start != "")
              <meta itemprop="startDate" content="{{ $startIso }}" />
            @endif
            <i class="fa fa-calendar"></i>
            <span class="text">Start: </span>
            <span class="data"> @if ($start != "") {{ $start }} @else N/A @endif</span>
          </div>
          <div class="large-5 medium-6 columns end">
            @if ($exam != "")
              <meta itemprop="endDate" content="{{ $examIso }}" />
            @endif
            <i class="fa fa-pencil-square-o"></i>
            <span class="text">Exam: </span>
            <span class="data"> @if ($exam != "") {{ $exam }} @else N/A @endif </span>
          </div>
        </div>
      </div>

      <article class="description columns" itemprop="description">
          {{ $courseTypesDescription->course_type_desc }}
      </article>

    </div>

Upvotes: 1

Views: 1723

Answers (2)

shaurya_b
shaurya_b

Reputation: 97

I agree with unor's answer but I would recommend you to use http://schema.org/Event rather than using http://schema.org/EducationEvent because Google is currently showing rich snippets on organic search for only those categories which are their in the Help Center document-

https://support.google.com/webmasters/answer/99170?hl=en

What you are implementing is a sub category of Event schema. You are correct in your way as you must be trying to specify the kind of events you have on your website. But as per my experience Google is not showing snippets for all available sub categories present on schema.org like schema.org/EducationEvent

Schema.org is format(syntax) of rich snippet markup implementation and apart from that schema.org has long list of Structured Data categories and Sub Categories. For all of those categories(http://schema.org/docs/full.html) Google doesn't show snippets. Only those appear with rich snippets on Google which are present in their official help center document as mentioned above.

This will increase the possibility to earn rich snippets for your website.

Upvotes: 3

unor
unor

Reputation: 96697

Your usage of Microdata with the Schema.org vocabulary is correct (if you make sure to remove the properties with empty values). Schema.org doesn’t define any required properties.

It’s just that Google Search, according to their documentation, seems to require the startDate property for displaying the Events Rich Snippet (and also location if it’s a single event, and url if your page lists several events).

If you don’t provide it, and if Google’s docs are correct, you won’t get (the chance for displaying) a Rich Snippet for your event. They probably require a future start date because they don’t like to display Rich Snippets for past events.

That doesn’t mean that you should omit the markup. It can be useful for other consumers (even possibly from Google, unrelated to their Rich Snippets), and Google’s Rich Snippets guidelines might change in the future, allowing for other types of Event snippets.

Upvotes: 1

Related Questions