Chiranjit Kumar Ghosh
Chiranjit Kumar Ghosh

Reputation: 21

"The property gtin12 is not recognized by Google for an object of type Text"

I read some information from https://schema.org/identifier and https://schema.org/Text.

<div itemprop="identifier" itemtype="http://schema.org/Text" itemscope>
  <meta itemprop="gtin12" content="{$product.upc}" />
</div>

Here in https://schema.org/Text property gtin12 is present, but I got this error in Google Schema tester:

The property gtin12 is not recognized by Google for an object of type Text.

Upvotes: 2

Views: 514

Answers (1)

unor
unor

Reputation: 96547

Text is a data type. Data types aren’t supposed to be used as types like that.

If you want to add gtin12 to a Product, you don’t need to specify identifier (because gtin12 is a sub-property of identifier) nor Text (in Microdata, the content value is by definition a text value).

<!-- if the gtin12 should not be visible on the page -->
<article itemscope itemtype="http://schema.org/Product">
  <meta itemprop="gtin12" content="{$product.upc}" />
</article>
<!-- if the gtin12 should be visible on the page -->
<article itemscope itemtype="http://schema.org/Product">
  <p itemprop="gtin12">{$product.upc}</p>
</article>

Upvotes: 2

Related Questions