Hi,
I saw the video on this module: Schema.org and it should work perfectly but for me sadly it doesn't. When I try to set my content type to schema.org settings >> Type: Product I get an error in RichSnippets that says:
- Error: Missing required field "name (fn)".
- Error: Incomplete rdfa with schema.org.
See screenshot of error here or see attachment below: schema.org-error.jpg
When I change the type to Type: Thing or Type: WebPageElement the errors go away, but no matter what I do my settings don't appear. I have set one of my content type fields (field_ecard_background_small) to image for example (see screenshot here or attached image) but no image appears in the RichSnippets preview of my page: http://dev-pal-ecards.com/rushing-quarterback
Any help is greatly appreciated.
Comment | File | Size | Author |
---|---|---|---|
schema.org-image.jpg | 171.73 KB | tsmulugeta | |
schema.org-error.jpg | 167.92 KB | tsmulugeta |
Comments
Comment #1
tsmulugeta CreditAttribution: tsmulugeta commentedComment #2
scor CreditAttribution: scor commentedThe reason is that the schema:name value is missing from the node content output. There are several possibilities to explain this. Either the node template was overridden in your theme, or you are using a contrib module to generate the node output, such as panels or Display Suite. Does any of these apply to your site?
Comment #3
scor CreditAttribution: scor commentedI can confirm the image mapping is set right, but note that the image will not necessarily appear in the preview unless your page also includes the price (see Google Rich Snippets documentation for Product).
Are you using a distribution such as Commerce Kickstart, or a module like Commerce? Using a module like https://drupal.org/project/commerce would help you to get rich snippets working, since all you would have to do is to install https://drupal.org/project/commerce_goodrelations.
Comment #4
tsmulugeta CreditAttribution: tsmulugeta commentedHi Scor,
Thanks for your quick response.
To answer your #2 post: These pages have their own node template called node--ecard.tpl.php. I am not sure how to fix this issue. I would be happy to give you a copy of this file if needed.
To answer your #3 post: I added a PRICE field to my content type. This field is of field type: float and decimal marker: decimal point. The image however still does not appear in RichSnippets for my page: http://dev-pal-ecards.com/rushing-quarterback
Please let me know if you need any additional information. I am really perplexed as to why things are not working.
Thanks so much!
Comment #5
tsmulugeta CreditAttribution: tsmulugeta commentedHi Scor,
My email is tsmulugeta@gmail.com if you would like access to my website.
Thanks again!
Comment #6
tsmulugeta CreditAttribution: tsmulugeta commentedCan anyone help me with this? Any ideas on my this isn't working?
Comment #7
ghankstef CreditAttribution: ghankstef commentedI can duplicate the problem with missing required field: name (fn).
And if I view the Google preview with the your url it looks like it is now working. What did you have to do?
http://www.google.com/webmasters/tools/richsnippets?q=http%3A%2F%2Fdev-p...
Comment #8
ghankstef CreditAttribution: ghankstef commentedOK so in my case there is a div in the main content block that looks like this:
<div about="/recipes/clementine-kalamata-pudding-in-rosemary-caramel" typeof="schema:Recipe v:Recipe" class="ds-1col node node-recipe view-mode-full clearfix">
And the h1 title with the schema:name property comes before this. If I move the h1 inside this div then it works in the Google rich snippet preview. So its going to take some themeing to accomplish this in my case
Comment #9
scor CreditAttribution: scor commented@ghankstef: if you have the schema.org module enabled, it will add the schema:name as hidden metadata in the body of you node, unless you are overriding you node template somehow. Do you have a public version of your site somewhere so I can take a look?
Comment #10
valery86 CreditAttribution: valery86 commentedHi @scor,
I'm also having this issue in my Google Webmaster Tools, you can take a look to this example.
http://www.thespanishcuisine.com/recipes/tuna-stuffed-eggs
The weird thing is that the Google rich snippet preview works fine...
Thanks
Comment #11
kingfisher64 CreditAttribution: kingfisher64 commentedI'm getting this error for the article content type with:
ProfessionalService The @type is required and cannot be an empty string.
It's not empty but has "ProfessionalService" as it's name. Then for the fields:
Image = ImageObject (tried image but that errored out on https://search.google.com/structured-data/testing-tool)
Body = description
Media = associatedMedia
There are ordering and tags fields not filled in but from the error message it doesn't sound like they are the problem as they are not output on the frontend only backend.
https://search.google.com/structured-data/testing-tool#url=kingfisher.de... is the result.
Can anyone advise? Many thanks
Comment #13
vbonasa CreditAttribution: vbonasa commentedHi,
I'm getting same error as @kingfisher64, also with the schemaorg_event example module. On a clean Drupal 7.44 I install schemaorg (version 7.x-1.0-rc1) and the required modules to the example Event submodule to work, I’ve created an Event content type node and testing-tool (https://search.google.com/structured-data/testing-tool) returns error "Event (The @type is required and cannot be an empty string.)"
On another clean installation I just enable Schema.org and Schema.org UI modules and create a content type for event, when I just do the mapping to the content type (property "Type") the validation it's fine but when I map any field, for example the "name" property, the validator returns error "Event (The @type is required and cannot be an empty string.)" again.
Any advice?
Thanks!
Comment #14
reufhaadfe CreditAttribution: reufhaadfe commentedI appear to be having a similar error as @kingfisher64, and @vbonasa. In my case, Product and IndividualProduct types do not work.
Here is Google's structured data output.
@type IndividualProduct (The @type is required and cannot be an empty string.)
@id http://www.example.com/test-page
name Test Page
http://purl.org/rss/1.0/modules/content/encoded
test page
url http://www.example.com/test-page
name Test Page
The type does seem to be set as you can see below.
On another note, the TechArticle type works fine and validates correctly.
Any ideas?
Comment #15
Baysaa CreditAttribution: Baysaa as a volunteer commented#14 You need to remove the other stuff from typeof property. This validates (just removed "sioc:Item" and "foaf:Document" from typeof) :
Google's structured data linter is quite strict. You need to follow their documentation, and not schema.org. Also you can't have more than 1 type afaik otherwise it complains.