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.

CommentFileSizeAuthor
schema.org-image.jpg171.73 KBtsmulugeta
schema.org-error.jpg167.92 KBtsmulugeta
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

tsmulugeta’s picture

Issue summary: View changes
scor’s picture

Title: CANT GET SCHEMA.ORG TO WORK PROPERLY » Can't get schema.org to work properly (schema:name missing from node output)

The 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?

scor’s picture

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

I 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.

tsmulugeta’s picture

Hi 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!

tsmulugeta’s picture

Hi Scor,

My email is tsmulugeta@gmail.com if you would like access to my website.

Thanks again!

tsmulugeta’s picture

Can anyone help me with this? Any ideas on my this isn't working?

ghankstef’s picture

I 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...

ghankstef’s picture

OK 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

scor’s picture

@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?

valery86’s picture

Hi @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

kingfisher64’s picture

I'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

vbonasa’s picture

Hi,

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!

reufhaadfe’s picture

I 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.

<div class="content clearfix">
<article about="/test-page" typeof="schema:IndividualProduct sioc:Item foaf:Document" class="node node-product-landing-pages node-published node-not-promoted node-not-sticky author-censored odd clearfix" id="node-product-landing-pages-383">
<span property="schema:name" content="Test Page" class="rdf-meta element-hidden"></span>    
  
<div class="content clearfix">
<div class="field field-name-body field-type-text-with-summary field-label-hidden"><div class="field-items"><div class="field-item even" property="content:encoded"><p>test page</p></div></div></div><span rel="schema:url" resource="/test-page" class="rdf-meta element-hidden"></span><span property="schema:name" content="Test Page" class="rdf-meta element-hidden"></span>  </div>

On another note, the TechArticle type works fine and validates correctly.

Any ideas?

Baysaa’s picture

#14 You need to remove the other stuff from typeof property. This validates (just removed "sioc:Item" and "foaf:Document" from typeof) :

<div class="content clearfix">
<article about="/test-page" typeof="schema:IndividualProduct" class="node node-product-landing-pages node-published node-not-promoted node-not-sticky author-censored odd clearfix" id="node-product-landing-pages-383">
<span property="schema:name" content="Test Page" class="rdf-meta element-hidden"></span>    
  
<div class="content clearfix">
<div class="field field-name-body field-type-text-with-summary field-label-hidden"><div class="field-items"><div class="field-item even" property="content:encoded"><p>test page</p></div></div></div><span rel="schema:url" resource="/test-page" class="rdf-meta element-hidden"></span><span property="schema:name" content="Test Page" class="rdf-meta element-hidden"></span>  </div>

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.