JobPosting schema issue: Number is not a known valid target type for the baseSalary property - schema.org

I'm a little confused about the new JobPosting listing on schema.org, specifically the baseSalary property's expected type.
The docs say that Number is one of the three expected types:
schema JobPosting SS
But when I test the page on Google structured data testing tool I get this warning:
Google warning
stating that 'Number is not a known valid target type for the baseSalary property.'
Nothing weird in the code, just a simple span with the baseSalary itemprop:
<span itemprop="baseSalary">36000</span>
Am I misunderstanding this or missing something?
Cheers

This is not schema.org error. This issue related specifically to google validator & rich snippets recommended properties/guidelines (I agree that an error message does not contribute too much information).
For rich results - Google Required MonetaryAmount as a type for baseSalary (Not number)
"baseSalary": {
"#type": "MonetaryAmount",
"currency": "USD",
"value": {
"#type": "QuantitativeValue",
"value": 40.00,
"unitText": "HOUR"
}
}
Docs & examples:
https://developers.google.com/search/docs/data-types/job-posting

In case someone wants to use HTML elements for the baseSalary instead of ld+json schema:
<span itemprop="baseSalary" itemtype="https://schema.org/MonetaryAmount" itemscope>
<span itemprop="value" itemtype="https://schema.org/QuantitativeValue" itemscope>
<span itemprop="value">30</span>
<span itemprop="unitText">HOUR</span>
</span>
<span itemtype="https://schema.org/salaryCurrency" itemprop="currency">USD</span>
</span>

Related

SDTT error: "Service is not a known valid target type for the itemReviewed property"

Using the following HTML+RDFa:
<div vocab="https://schema.org/" typeof="Service">
<meta property="name" content="My Service Name"/>
<div property="description">
For verified ratings of our services, please view our:
<a
href="https://www.capterra.com/link/to/captera"
target="_blank"
>4.9 Star Rating on Capterra</a>
</div>
<div property="aggregateRating" typeof="AggregateRating">
<div>
Capterra Rating:
<span property="ratingValue">4.9</span> out of
<span property="bestRating">5</span> with
<span property="ratingCount">112</span> ratings
</div>
</div>
</div>
This snippet is in my code, but when I test it all in Google's Structured Data Testing Tool, I get the following error:
I'm having trouble accepting this error because (if i'm reading this correctly), according to the Service docs in https://schema.org/, this is a supported property. I'm sure there is a syntax error somewhere or, if I dare touch the sun, Google is wrong.
I ran it through the structured data and it recognized it:
What am I doing wrong here?
You are not doing anything wrong.
On 16th Sep 2019, Google tweaked their rich snippets requirements, wherein the itemReviewed property is now supported only for a very small list of Schema.org types.
As per Google:
While, technically, you can attach review markup to any schema type,
for many types displaying star reviews does not add much value for the
user. With this change, we’re limiting the pool of schema types that
can potentially trigger review rich results in search. Specifically,
we’ll only display reviews with those types (and their respective
subtypes)...
Earlier, CreativeWork, Article, BlogPosting, Service were all supported and there was no error message on the structured data testing tool.
Now, any schema other than the list below will trigger a '_______ is not a known valid target type for the itemReviewed property.' error.
The valid types for the itemReviewed property are:
Book
ListItem
Course
CreativeWorkSeason
CreativeWorkSeries
Episode
Event
Game
HowTo
LocalBusiness
MediaObject
Movie
MusicPlaylist
MusicRecording
Organization
Product
Recipe
SoftwareApplication
Note : There are other schema types that are valid and may not trigger an error message on the testing tool for aggregateRating or itemReviewed. However, from the Google Blog posting, I understand it as 'Even if the schema is valid, stars / rich snippets may not show up for schemas other than those specifically listed.'

Publisher and Name Microdata

In a BlogPosting or an Article if the publisher is a person how to use Schema.org and Microdata?
I could find that answer:
Proper way to use 'publisher' in BlogPosting
<div itemprop="publisher" itemscope itemtype="http://schema.org/Person">
<span itemprop="name">Some Name</span>
</div>
But the Google Testing Tool says:
The attribute publisher.itemtype has an invalid value
Perhaps I do not understand well well the answer? How to use publisher if it is a person or if it is the same than the author?
That is the correct way to provide the publisher in case it’s a person.
Unfortunately, most of the time Google’s SDTT reports something as error which isn’t an error with Schema.org/Microdata, but with Google’s requirements for getting one of their rich results.
This seems to be the case here, too: it’s likely an error for the AMP version of the Articles rich result, for which Google only considers organizations (and not persons) as publishers:
publisher
Organization; required (AMP), ignored (non-AMP)
The publisher of the article.
So if the publisher is a person, simply ignore this error.
If the publisher is the same as the author, you can use both properties in the same itemprop attribute:
<div itemprop="author publisher" itemscope itemtype="http://schema.org/Person">

Proper way to use the 'publisher' property ("The attribute publisher.itemtype has an invalid value.")

When I attempt to validate my structured data using Google's Structured Data Testing tool, I get an error:
The attribute publisher.itemtype has an invalid value.
I am getting that on this line:
<meta itemprop="publisher" content="My Real Name Here" />
How do I provide a valid value for this property?
The expected value of the publisher property is another item (Organization or Person).
While Schema.org always allows to provide a string value (like you do), Google might require a certain value type for one of their search features (e.g., an Organization value for their Articles rich result for AMP HTML pages). If you don’t care about (or can’t qualify for) this feature, you can ignore the error in the SDTT.
The problems with using a string value: it’s not clear if the publisher is a person or an organization, and it’s not possible to provide additional data about the publisher.
If you want to provide an item, it could look like:
<div itemprop="publisher" itemscope itemtype="http://schema.org/Person">
<p itemprop="name">NewGuy</p>
</div>
<div itemprop="publisher" itemscope itemtype="http://schema.org/Organization">
<p itemprop="name">NewGuy Inc.</p>
</div>

"The attribute publisher.itemtype has an invalid value"

I'm new to code. I'm trying to add Structured Data code for Google reviews on my contact page:
http://www.catnips.co.uk/in-home-mobile-cat-groomer-feline-behaviourist.html
I am using the reviews from my Google Maps client reviews.
Testing it in Google Structured Data Testing Tool, it says
The attribute publisher.itemtype has an invalid value.
I can't work out what I'm doing wrong.
<div itemprop="review" itemscope itemtype="http://schema.org/Review">
<meta itemprop="author" content="Anita Kelsey">
<strong itemprop="itemreviewed">Mobile Cat Grooming</strong> by Jen Crothers<br />
<strong>My Rating:</strong> <span itemprop="reviewRating" itemscope itemtype="http://schema.org/Rating"><img src="http://www.catnips.co.uk/wp-content/uploads/2014/09/5-stars-356x73.png" alt="5 stars" width="356" height="73" class="alignnone size-medium wp-image-4614" /><meta itemprop="ratingValue" content="5" /><meta itemprop="bestRating" content="5" /></span>
</div>
<span itemprop="reviewRating" itemscope itemtype="http://schema.org/Rating">
Anita was absolutely brilliant with my Persian cat Ernie, who was a wriggly customer at times. She skillfully and gently removed the mats on his coat and gave him a very thorough groom. Brilliant, professional and easily a five star service provided from start to finish.
<meta itemprop="ratingValue" content="5" /><meta itemprop="bestRating" content="5" />
The error is not in the code you provided in your question body, but rather in the JSON-LD. In the Structured Data Testing Tool, you can click on an error to be taken to the line in the code that caused the error. This helps you identify what caused the problem.
The error is informing you that the itemtype you provided for the publisher property is invalid. Whilst schema.org does support the type Person for the publisher property of Article, Google does not. Google only supports Organization, not Person, as the type for the publisher property, as mentioned in the Articles Structured Data page on Google Developers.
                          
You can fix error in settings: Yoast SEO > Search Appearance > Knowledge Graph > Choose Company or Person.
Of course you do! You just don't know it yet. ;) Try using this line:
"publisher":{"id":"http://www.catnips.co.uk/#organization"},
"baseSalary": {
"#type": "MonetaryAmount",
"currency": "EUR",
"value": {
"#type": "QuantitativeValue",
"value": 850,
"unitText": "MONTH"
}
}

Google does not correctly merge microdata and json+ld in the same page using same URI id

I have a product page with "microdata" and "json+ld" codes. Both of the codes refers to the same #id URI object (http://www.example.org/product#this) so I would expect to "mix/merge" both properties, but instead structured data testing tool shows 2 "individual" products so....
1- Does Google support using two syntax in the same page?
2- Is this well implemented? Can I refer two codes to the same object using itemId for microdata and #id for json+ld?
3- Can this damage my page in terms of structure data indexing?
thanks
You can check it out using this code in test tool:
<div itemscope itemtype="http://schema.org/Product" itemid="http://www.example.org/product#this">
<a itemprop="url" href="http://www.example.org/product">
<div itemprop="name"><strong>Product Name</strong></div></a>
<div itemprop="description">Product Description</div>
<div itemprop="brand" itemscope itemtype="http://schema.org/Organization"><span itemprop="name">Product Brand</span></div>
<div itemprop="offers" itemscope itemtype="http://schema.org/Offer"> <span itemprop="price">100</span><link itemprop="itemCondition" href="http://schema.org/NewCondition" /> New</div>
</div>
<script type="application/ld+json">
{
"#context": "http://schema.org/",
"#id": "http://www.example.org/product#this",
"name": "Product Name",
"#type": "Product",
"image": "http://www.example.com/anvil_executive.jpg",
"mpn": "925872",
"brand": {
"#type": "Thing",
"name": "ACME"
},
"offers": {
"#type": "Offer",
"priceCurrency": "USD",
"price": "119.99",
"itemCondition": "http://schema.org/UsedCondition",
"availability": "http://schema.org/InStock"
}
}
</script>
My guess would be that Google’s Structured Data Testing Tool doesn’t support this for different syntaxes, as it seems to work if using the same syntax. But as they still display the URIs correctly (http://www.example.org/product#this in both cases), you could argue that it’s just the tool’s interface that doesn’t merge them.
However, as far as I know Google does not document to support these subject URIs anyway (but this doesn’t necessarily mean that they don’t support it), so it might not matter for them.
Your example works fine if using http://linter.structured-data.org/: it creates one item with both brands and both offers.
While technically it is feasible to merge data coming from two different syntaxes (read microdata and json-ld) and the Structured Data Linter confirms so, Google does not support it, which means properties won't be merged (and won't satisfy Rich Snippets' requirements).
We have a final confirmation by several actors in the SEO World, including Dan Brickley and Jarno van Driel.
in general you can use both syntaxes side by side, but you won't get
the fine-grained merging of triples by ID that a pure RDF application
might expect (Dan Brickley on Twitter, Jan 14th, 2020, bold mine)
--
I think #danbri already was pretty clear. Highly doubt you'll get a
different answer from other Googlers. (Jarno van Driel on Twitter, Jan 14th, 2020)
The proposed solution so far is to parse the microdata and publish it as JSON-LD.