Make WordPress Core

Opened 11 years ago

Last modified 2 years ago

#26723 reopened defect (bug)

Twenty Fourteen: Hatom Errors

Reported by: fidosysop's profile fidosysop Owned by:
Milestone: Future Release Priority: low
Severity: normal Version: 3.8
Component: Bundled Theme Keywords: needs-patch
Focuses: template Cc:



Getting this on Google's Structured Data Testing tool.

Extracted structured data
Error: At least one field must be set for HatomEntry.
Error: Missing required field "entry-title".
Error: Missing required field "updated".
Error: Missing required hCard "author".

The 1st two are caused by using WordPress with a static home page, this started with the 3.8 release. I am using a theme designed in Artisteer that worked fine before the 3.8 release. Artisteer is no help pointing the finger at WordPress. Activating WP 2014 theme solves the 1st 2 errors but the below still shows.

Error: Missing required field "updated".
Error: Missing required hCard "author".

The second two have been present showing as "Warnings" in self hosted WordPress sites for a long time. However since a recent Google algorithm chance those warnings are now Errors. An announcement from Google.

Below is a screen shot of one of my sites Google webmaster tools accounts.

All of my sites structured data thumbnails have disappeared from search results. I have posted about this situation in the WordPress forums with no help so far.

Thanks for your help with this.

Ed Koon

Attachments (1)

26723.diff (3.9 KB) - added by slobodanmanic 10 years ago.

Download all attachments as: .zip

Change History (23)

#1 @rmccue
11 years ago

  • Component changed from General to Bundled Theme

The first set of errors are entirely up to your theme, so we can't do much about that.

However, we can look at the errors in Twenty Fourteen, since it's bundled. :)

#3 @fidosysop
11 years ago

  • Cc fidosysop@… added

I set this site up to test a stock WordPress 3.8 install for structured data compliance: All 3 themes that are included in the WordPress install package are failing the test with these two errors.

Error: Missing required field "updated".
Error: Missing required hCard "author".

I'm thinking this is a core WordPress fault at this point.

Happy New Years Everyone :)

Ed Koon

#4 @obenland
10 years ago

Interesting ticket. Let's look at the attributes one by one:

This would be fairly easy to achieve, some projects provide support for it out of the box, but it would add more complexity to the post meta template tag.

We're missing that one on formatted posts where we don't display a title. I suppose we could print the markup and hide it on formatted posts that have a title set.

This error shows up on all featured posts in Twenty Fourteen, since we do not display author information here. Solution would be similar to entry-title.

#5 @lancewillett
10 years ago

  • Keywords needs-patch added
  • Milestone changed from Awaiting Review to Future Release
  • Priority changed from normal to low

#6 @lancewillett
10 years ago

  • Milestone Future Release deleted
  • Status changed from new to closed

Anyone want to patch this ticket?

#7 @lancewillett
10 years ago

  • Milestone set to Future Release
  • Status changed from closed to reopened

#8 @slobodanmanic
10 years ago

@lancewillett I'd like to give this a try. Been intimidated by Trac for way too long, but finally found a ticket I understand. What @obenland suggested makes perfect sense.

entry-title fix should also include links Links Ephemera widget.

#9 @lancewillett
10 years ago

  • Focuses template added
  • Milestone changed from Future Release to 4.0

Cool, happy to test and review a patch once you are ready.

#10 @slobodanmanic
10 years ago

@lancewillett I appreciate that. Working on the patch today.

@obenland I noticed something weird when testing markup with Google Structured Data Testing Too:

  • Adding updated class to a new <time> element, the way _s does not fix Error: Missing required field "updated"
  • Adding updated class to existing <time> element makes the error go away (I know that's a hack and not the way to go, because we still need two <time> elements)
  • The weirdest one for me, removing <time> element that has published class does not cause any new errors

All these edits made to twentyfourteen_posted_on() function. I'll keep working on it.

Edit: Never mind, I think I got it, will upload patch later today.

Last edited 10 years ago by slobodanmanic (previous) (diff)

10 years ago

#11 @slobodanmanic
10 years ago

According to if there is no "updated", then "published" should be used, if present:

if there is no Entry Updated element,
use the Entry Published element, if present
otherwise the page is invalid hAtom

So, in twentyfourteen_posted_on this patch adds "updated" class to "entry-date" <time> element if updated time is not the same as published, otherwise it creates new <time> element with "updated" class.

A few other updates, switched meta display in Ephemera widget to use twentyfourteen_posted_on (the code used in widgets.php was identical to template tag function) and also added twentyfourteen_posted_on to posts in featured-content.php template part.

Also CSS updates to hide added "updated" and "entry-title" (in Links Ephemera widget) elements.

P.S. 2013 and 2012 have the same problem with "updated", so if this patch is OK I'd like to work on those as well.
It all validates now:

Last edited 10 years ago by slobodanmanic (previous) (diff)

This ticket was mentioned in IRC in #wordpress-themes by obenland. View the logs.

10 years ago

#13 @obenland
10 years ago

  • Milestone changed from 4.0 to Future Release

Worthwhile effort but it's too soon for 4.0. Let's keep working on it.

#14 follow-up: @slobodanmanic
10 years ago

@obenland I don't understand this one, could you help:

Why does the_title( '<h1 class="entry-title">', '</h1>' ) need to be <h1 class="entry-title"><?php the_title(); ?></h1> for this ticket?

#15 in reply to: ↑ 14 @obenland
10 years ago

Replying to slobodanmanic:

Why does the_title( '<h1 class="entry-title">', '</h1>' ) need to be <h1 class="entry-title"><?php the_title(); ?></h1> for this ticket?

If the tags are passed to the_title(), they will not be rendered if the title is empty. Since we always need them to satisfy the parser, we'd have to pull them out of the function.

#16 @slobodanmanic
10 years ago

@obenland thanks.

Just tested this and having empty tags still makes it invalid.

<h1 class="entry-title"><a href="http://wordpress.svn/?p=565" rel="bookmark"></a></h1>

That results in Error: Missing required field "entry-title" which is the same as if the tags didn't exist. But I don't think we should worry about this, if you don't have a title then a parser that requires titles is going to say your page is invalid, I'd expect it to say that.

I'll gladly keep working on this ticket, but the title issue seems to be fine as it is.

Google's tool says comment markup is also invalid, but I don't think it can be fixed, since it would require introducing new fields in comment form. We could (and probably shouldn't) use URL field for organization, but there's nothing for location or role.

This is only invalid according to Google (, hCard definition ( has different required rules.

#17 @edkoon
10 years ago

This mod was needed to pass authorship testing and be eligible for the program. I design my themes in Artisteer but got the same errors in wp 2014. Google has slashed it's authorship program. They removed all the thumbnails and circles. All that shows now is the author name.

This ticket was mentioned in Slack in #core-themes by lancewillett. View the logs.

9 years ago

#19 @karmatosed
9 years ago

#32317 was marked as a duplicate.

#22 @desrosj
2 years ago

  • Summary changed from Hatom Errors to Twenty Fourteen: Hatom Errors
Note: See TracTickets for help on using tickets.