-
Notifications
You must be signed in to change notification settings - Fork 3.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Schema.org microdata failing validation #1885
Comments
Thanks for the report. This is definitely something we should fix up. |
Can the Validator also be updated to allow
Currently the above throws the following AMP error: Or is better to just leave the
|
@EnigmaSolved, I think @honeybadgerdontcare 's change already addresses this. I created a document which looks like:
And it validates just fine. Is it possible that your error is already fixed? Alternatively, perhaps there is more than one If neither of these theories pan out, can you send a more complete document which you are still seeing this validation error on? Thanks. |
@Gregable, yeah, I think we can leave things as-is. What I was doing was something along the lines of:
The reason I got to exploring all of this is that the method Google illustrates for including And Google complains if there's not a But I don't believe the
:) |
Glad it worked out in the end. One of the other issues here is that the error messages we are producing are a bit misleading, for instance the |
Yeah, I understand regarding that (the error messages). I figured out pretty quickly that it was just that it didn't like the You know, it might work better (or be more manageable) to make the errors less specific (just reference the tag or property that the error is about), and then have lots of examples on the linked-to page of what could be going on. And certainly errors that seem to show up a lot (do you all have a way of tracking that via the Validator?) you can design more specific errors for. But it seems it'd be less work for you to update a list of examples here on Github (especially for edge cases) than to be trying to code for so many variations on errors (like the above example). Just a thought. :) |
It's a good idea. We will probably have to do that in some cases. I suppose it's ironic that more specific messages end up worse in this case. Right now, we're doing a few iterations to see if we can improve the context of these error messages. In this case, it shouldn't be too tough. The logic should be something like "if your meta tag doesn't have a charset attribute, don't generate errors related to the meta charset tag spec.". |
Sounds good, and I'm glad I could be helpful! |
Hello @Gregable , I am still having the problem described in the original post error:
html:
I am using Any advice? |
I have some Schema.org microdata style markup which is failing the AMP validator.
<div itemscope itemtype="http://schema.org/Photograph" itemid="http://www.example.com/Pomeranian.html">
<link itemprop="mainEntityOfPage" href="http://www.example.com/Pomeranian.html">
<meta itemprop="headline" content="Pomeranian">
<meta itemprop="datePublished" content="2016-02-08">
...
</div>
The code validates through Google's Structured Data Testing tool, but I'm seeing it flagged with these AMP validation errors:
The attribute 'itemid' may not appear in tag 'div'
The mandatory attribute 'rel' is missing in tag 'link rel='.
As Schema.org metadata is recommended by the spec it seems like common microdata formats like this should validate.
The text was updated successfully, but these errors were encountered: