Mobile app version of vmapp.org
Login or Join
Alves908

: Tag property og:type not recognized by the Structured Data Tool I am currently adding some Schema.org properties on a website and in order to validate my work, I am parsing all pages in Google’s

@Alves908

Posted in: #GoogleRichSnippetsTool #OpenGraphProtocol

I am currently adding some Schema.org properties on a website and in order to validate my work, I am parsing all pages in Google’s Structured Data Testing Tool. Everything is fine except for one thing, it displays for every page a message saying Unspecified Type even though it mentions 0 errors and 0 warnings!



By clicking on it, you can see where the error is located in the document, and it shows the OG tags I have filled. It displays the type «og:website» but still declares the type is not recognized.

You can check this line is present and read by the tool:

<meta property="og:type" content="website" />


When I check the pages with other tools specifically related to OG tags, I have no warning at all.

I thought maybe a wild invisible character prevents the parsing of this data, but it does see the value …!

What is wrong in my code? Should I worry about this when this tool is not made to specifically validate OG tags?

ref: the page in the Testing Tool

10.01% popularity Vote Up Vote Down


Login to follow query

More posts by @Alves908

1 Comments

Sorted by latest first Latest Oldest Best

 

@Shanna517

Usually a vocabulary has classes/types (like Person) and properties (like name), but OGP only has properties, which is somewhat unusual.

While OGP defines a type property, its value is just a string (like "website"), not an actual RDF class.

A consumer specifically expecting the use of the OGP vocabulary will cope with this. Such a consumer might assume that OGP properties in a document are always about that document.

A general consumer of RDF data would prefer to know what the properties are about. If there is a name property in a document, whose name is it? This can be conveyed in three ways:


Provide a type.
(It’s the name of a Person.)
Provide a subject URI.
(It’s the name of the thing identified by example.com/alice#i.) Provide a type and a subject URI.
(It’s the name of the Person identified by example.com/alice#i.)

Google’s SDTT falls into the general consumer camp:


If you don’t provide a type nor a subject URI,

<!DOCTYPE html>
<head>
<meta property="og:type" content="website" />
<meta property="og:title" content="Leg pain caused by varicose veins" />
</head>


the SDTT ignores the OGP properties:




If you provide only a type,

<!DOCTYPE html>
<head typeof="foaf:Document"> <!-- just an example, don’t use this type -->
<meta property="og:type" content="website" />
<meta property="og:title" content="Leg pain caused by varicose veins" />
</head>


the SDTT adds the properties to the item with this type, as expected.





But if you use a type from the vocabulary Schema.org, the SDTT reports errors, because the OGP properties are not recognized for this type (this is due to SDTT’s special handling of Schema.org).
If you provide only a subject URI,

<!DOCTYPE html>
<head resource="/#this-website">
<meta property="og:type" content="website" />
<meta property="og:title" content="Leg pain caused by varicose veins" />
</head>


the SDTT adds the properties to an item without type ("Unspecified Type"), identified by the URI, as expected.





This is also triggered by a base element (giving a URI for the whole document), like you have one in your page.


So, what does this mean?


If you provide the OGP properties for the OGP-specific consumers (like Facebook), you can keep your markup like that. These consumers don’t expect a type (if they do, they’d document it).
If you use OGP like any other RDF vocabulary, you would want to provide a type, or a subject URI, or ideally both, anyway. From Schema.org, types like WebPage and WebSite might be relevant.

In that case: keep in mind that many of SDTT’s warnings and errors are for Google-specific search result features (without explicitly saying so), so it’s not a good tool for general-purpose checking of your structured data.

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme