I started by checking a few of my D7 sites out with http://check.rdfa.info

That got me to checking out google's use of RDFa http://www.google.com/webmasters/tools/richsnippets

Which got me wondering about the following errors:

Insufficient data to generate the preview.
Extracted rich snippet data from the page

Image
Warning: RDFa tree has unknown type 'Image'.
UserAccount
Warning: RDFa tree has unknown type 'UserAccount'.

Item
has_creator UserAccount
title = Meeting March 1, 2011
date = 2011-02-24T13:46:50-05:00
created = 2011-02-24T13:46:50-05:00
Warning: RDFa tree has unknown type 'Item'.

Document
has_creator UserAccount
title = Accessibility in the Government of Canada
date = 2010-12-21T14:58:09-05:00
created = 2010-12-21T14:58:09-05:00
Warning: RDFa tree has unknown type 'Document'.
Warning: The information will not appear as a rich snippet in search results, because the marked-up content does not appear to be the main focus of the page. More information. (Is this correct? Let us know.)

Post
title = Launching Early with Drupal 7
date = 2011-01-28T15:47:54-05:00
created = 2011-01-28T15:47:54-05:00
label = Drupal 7
label = Theming
label = OC Enhancements
label = Drupal 7.x
num_replies = 4
Warning: RDFa tree has unknown type 'Post'.

Image
Warning: RDFa tree has unknown type 'Image'.
Warning: The information will not appear as a rich snippet in search results, because the marked-up content does not appear to be the main focus of the page. More information. (Is this correct? Let us know.)

I don't know enough about how important this is or to know where the problem lies with this, but I'd be interested in hearing feedback about it.

I like to keep google happy with these things.

Comments

mradcliffe’s picture

What a coincidence. I was trying to validate some GoodRelations snippets in content and ran into similar issues with both SearchMonkey and Google Rich Snippets.

The Item error is coming from typeof="soic:Item foaf:Document" which is a part of node.module's rdf. The node that I was loading does not have any comments, which it looks like is what soic is mainly being used for here. I have a feeling, although I am not very good with this RDFa stuff, that this is the issue. The node I'm looking at also doesn't have author information.

Here are my results for a node used on the front page of a Drupal site:

  • Google Rich Snippets:
    • Warning: RDFa tree has unknown type 'Document'.

  • Yahoo! Search monkey:
    • No Objects found. Partial objects found:
    • content:encoded
    • dc:title
    • foaf:depiction
    • ns41:icon
  • W3 Markup Validation Service
    • Passes, but no rdfa information listed.
chougrani’s picture

I have the same error
"RDFa tree has unknown type 'Image'."

thehong’s picture

I have some problem:

Item
date = 2011-06-29T01:43:10+07:00
created = 2011-06-29T01:43:10+07:00
label = Google
label = SEO
Warning: RDFa tree has unknown type 'Item'.
UserAccount
Warning: RDFa tree has unknown type 'UserAccount'.
Image
Warning: RDFa tree has unknown type 'Image'.
Image
Warning: RDFa tree has unknown type 'Image'.
Image
Warning: RDFa tree has unknown type 'Image'.
Image
Warning: RDFa tree has unknown type 'Image'.
Image
Warning: RDFa tree has unknown type 'Image'.

scor’s picture

Status: Active » Closed (won't fix)

yes, google rich snippets will currently not recognize the types we have in Core (inserted in the typeof attribute) because it does not support "news/article" or "page" as part of its rich snippets types. You will need to customize your RDF mappings to match what Google expects among the types of pages it recognizes (Reviews, People, Events, Recipes, Product). Relevant module:
http://drupal.org/project/rdfx (RDF UI)
http://drupal.org/project/richsnippets

In any case, core will not support these types out of the box.

mradcliffe’s picture

So, just to be clear:

What you're saying is that in order for google to interpret rdfa on Drupal 7 web sites you need to disable/hide some of Core's rdfa markup such as foaf:document and foaf:image?

That does seem like something really wonky with Google, but I guess if you want to confirm that Google is in fact interpreting the document correctly you have to disable Drupal 7 core rdfa stuff?

Edit: I'm pretty sure it is working on their part, but if you wanted to make absolutely sure the preview worked you would have to disable stuff (hopefully temporarily).

scor’s picture

no, I didn't say that you have to disable them. Google does not have a rich snippet for the core content types "article" and "basic page", so it's normal that it will not display any RS for them "out of the box". The mappings Google expects are for example v:Person for their "People" rich snippet. The mapping we use in core (foaf:Document, foaf:Image) are very generic, but will not cause any harm as long as v:Person (and friends) are present as well. take a look at the richsnippets module which addresses these use cases.

mradcliffe’s picture

Okay, then I think you misunderstood the purpose of the issue. It's not a feature request for rich snippet support in core. The issue points out that the rich snippets tool doesn't give a preview because of the other rdfa namespaces (foaf).

So in order for the tool to preview correctly you would still need to hide core namespaces temporarily while you test?

scor’s picture

Google testing tool reports this warning because it cannot find the mapping it expects and then tries to fallback on the core ones. If you provide one of the mappings that Google expects, then it will work, even if you leave the core mappings in your page. For example, I've created a dummy page with a mapping that Google recognizes and one from core: typeof="v:Organization foaf:Document", and as you can see, there is no warning as long as you use one of Google's v:X mappings.

mradcliffe’s picture

And if the namespace being used doesn't correspond to anything, then you would need to hide it to remove the warning. I'm still correct on that, but it makes sense with your explanation now.