wp-parsely icon indicating copy to clipboard operation
wp-parsely copied to clipboard

Double Schema output combined with Yoast SEO

Open jdevalk opened this issue 2 years ago • 7 comments

Describe the bug

When a site runs Yoast SEO, potentially combined with Yoast's News SEO add-on as well as WP Parsely, both plugins output Schema.org JSON+LD blobs.

To Reproduce

An example of that can be found here (site running Newspack):

  • See this article on the Oaklandside.
  • You can run it through the Schema validator. If you click NewsArticle you'll see that the output is there twice...
  • Of course, if you just look at the source of that page, you can see it too :)

Expected behaviour

Ideally, only one set of Schema should be output. As Yoast SEO's seems more complete, I think that should work, but I'm not sure if Parsely can work with that?

Happy to discuss good solutions!

jdevalk avatar Jul 22 '22 21:07 jdevalk

At this time, though, Parse.ly's crawler does not access any JSON-LD located beneath the @graph node. This is likely to change in the future, but is not the case at present.

Thus while indeed there are two sets of schema, Parse.ly never sees the schema output by the Yoast plugin and thus that schema coming from our plugin is necessary.

arhine avatar Jul 22 '22 21:07 arhine

That's problematic for their SEO though, because there shouldn't be two of the same JSON+LD blobs on the page with schema data...

jdevalk avatar Jul 22 '22 21:07 jdevalk

Would your scraper parse Schema if displayed like this? Because then we might be able to just rip the graph out of the Yoast SEO output.

<script type="application/ld+json" class="yoast-schema-graph">[
{
		"@context": "https://schema.org",
		"@type": "Organization",
		"@id": "https://oaklandside.org/#organization",
		"name": "The Oaklandside",
		"url": "https://oaklandside.org/",
		"sameAs": [
			"https://www.instagram.com/oaklandside/",
			"https://www.facebook.com/theoaklandside/",
			"https://twitter.com/Oaklandside"
		],
		"logo": {
			"@type": "ImageObject",
			"inLanguage": "en-US",
			"@id": "https://oaklandside.org/#/schema/logo/image/",
			"url": "https://oaklandside.org/wp-content/uploads/2020/06/TheOaklandsideFnl_Logo_Marquee.png",
			"contentUrl": "https://oaklandside.org/wp-content/uploads/2020/06/TheOaklandsideFnl_Logo_Marquee.png",
			"width": 3913,
			"height": 706,
			"caption": "The Oaklandside"
		},
		"image": {
			"@id": "https://oaklandside.org/#/schema/logo/image/"
		}
	},
	{
		"@context": "https://schema.org",
		"@type": "WebSite",
		"@id": "https://oaklandside.org/#website",
		"url": "https://oaklandside.org/",
		"name": "The Oaklandside",
		"description": "The Oaklandside. Journalism for Oakland.",
		"publisher": {
			"@id": "https://oaklandside.org/#organization"
		},
		"potentialAction": [
			{
				"@type": "SearchAction",
				"target": {
					"@type": "EntryPoint",
					"urlTemplate": "https://oaklandside.org/?s={search_term_string}"
				},
				"query-input": "required name=search_term_string"
			}
		],
		"inLanguage": "en-US"
	},
	{
		"@context": "https://schema.org",
		"@type": "ImageObject",
		"inLanguage": "en-US",
		"@id": "https://oaklandside.org/2022/07/22/another-twist-in-the-coal-wars-west-oakland-terminal-developer-walks-away-from-settlement-deal/#primaryimage",
		"url": "https://oaklandside.org/wp-content/uploads/2022/02/Oakland-Army-Base-West-Gateway-Coal-Terminal.jpg",
		"contentUrl": "https://oaklandside.org/wp-content/uploads/2022/02/Oakland-Army-Base-West-Gateway-Coal-Terminal.jpg",
		"width": 1200,
		"height": 800,
		"caption": "Oakland's former Army Base seen from the air. The triangular slice of land on the left, known as the \"West Gateway\" was the location of a proposed coal export terminal."
	},
	{
		"@context": "https://schema.org",
		"@type": "WebPage",
		"@id": "https://oaklandside.org/2022/07/22/another-twist-in-the-coal-wars-west-oakland-terminal-developer-walks-away-from-settlement-deal/",
		"url": "https://oaklandside.org/2022/07/22/another-twist-in-the-coal-wars-west-oakland-terminal-developer-walks-away-from-settlement-deal/",
		"name": "Another twist in the coal wars: West Oakland terminal developer walks away from settlement deal",
		"isPartOf": {
			"@id": "https://oaklandside.org/#website"
		},
		"primaryImageOfPage": {
			"@id": "https://oaklandside.org/2022/07/22/another-twist-in-the-coal-wars-west-oakland-terminal-developer-walks-away-from-settlement-deal/#primaryimage"
		},
		"datePublished": "2022-07-22T20:00:00+00:00",
		"dateModified": "2022-07-22T18:51:59+00:00",
		"description": "In a surprise move, Phil Tagami just reopened his fight to build a coal terminal at Oakland’s former Army Base.",
		"breadcrumb": {
			"@id": "https://oaklandside.org/2022/07/22/another-twist-in-the-coal-wars-west-oakland-terminal-developer-walks-away-from-settlement-deal/#breadcrumb"
		},
		"inLanguage": "en-US",
		"potentialAction": [
			{
				"@type": "ReadAction",
				"target": [
					"https://oaklandside.org/2022/07/22/another-twist-in-the-coal-wars-west-oakland-terminal-developer-walks-away-from-settlement-deal/"
				]
			}
		]
	},
	{
		"@context": "https://schema.org",
		"@type": "BreadcrumbList",
		"@id": "https://oaklandside.org/2022/07/22/another-twist-in-the-coal-wars-west-oakland-terminal-developer-walks-away-from-settlement-deal/#breadcrumb",
		"itemListElement": [
			{
				"@type": "ListItem",
				"position": 1,
				"name": "Home",
				"item": "https://oaklandside.org/"
			},
			{
				"@type": "ListItem",
				"position": 2,
				"name": "Another twist in the coal wars: West Oakland terminal developer walks away from settlement deal"
			}
		]
	},
	{
		"@context": "https://schema.org",
		"@type": "NewsArticle",
		"@id": "https://oaklandside.org/2022/07/22/another-twist-in-the-coal-wars-west-oakland-terminal-developer-walks-away-from-settlement-deal/#article",
		"isPartOf": {
			"@id": "https://oaklandside.org/2022/07/22/another-twist-in-the-coal-wars-west-oakland-terminal-developer-walks-away-from-settlement-deal/"
		},
		"author": {
			"name": "David DeBolt",
			"@id": "https://oaklandside.org/#/schema/person/2356e26211d36142f7a732c4df4f2e86"
		},
		"headline": "Another twist in the coal wars: West Oakland terminal developer walks away from settlement deal",
		"datePublished": "2022-07-22T20:00:00+00:00",
		"dateModified": "2022-07-22T18:51:59+00:00",
		"mainEntityOfPage": {
			"@id": "https://oaklandside.org/2022/07/22/another-twist-in-the-coal-wars-west-oakland-terminal-developer-walks-away-from-settlement-deal/"
		},
		"wordCount": 1285,
		"publisher": {
			"@id": "https://oaklandside.org/#organization"
		},
		"image": {
			"@id": "https://oaklandside.org/2022/07/22/another-twist-in-the-coal-wars-west-oakland-terminal-developer-walks-away-from-settlement-deal/#primaryimage"
		},
		"thumbnailUrl": "https://oaklandside.org/wp-content/uploads/2022/02/Oakland-Army-Base-West-Gateway-Coal-Terminal.jpg",
		"keywords": [
			"Barbara Parker",
			"coal terminal",
			"Phil Tagami",
			"west oakland"
		],
		"articleSection": [
			"City Hall &amp; Policing"
		],
		"inLanguage": "en-US",
		"copyrightYear": "2022",
		"copyrightHolder": {
			"@id": "https://oaklandside.org/#organization"
		}
	},
	{
		"@context": "https://schema.org",
		"@type": "Person",
		"@id": "https://oaklandside.org/#/schema/person/2356e26211d36142f7a732c4df4f2e86",
		"name": "David DeBolt",
		"image": {
			"@type": "ImageObject",
			"inLanguage": "en-US",
			"@id": "https://oaklandside.org/#/schema/person/image/",
			"url": "https://oaklandside.org/wp-content/uploads/2021/08/DeBolt-1-96x96.jpg",
			"contentUrl": "https://oaklandside.org/wp-content/uploads/2021/08/DeBolt-1-96x96.jpg",
			"caption": "David DeBolt"
		},
		"description": "David DeBolt reports on City Hall and policing for The Oaklandside. He spent 12 years working for daily newspapers in the Bay Area, including on the Peninsula and Solano County. He joined the Bay Area News Group in 2012 where he covered a variety of beats, most recently as a senior breaking news reporter. During his time at BANG, DeBolt covered Oakland City Hall, the Raiders stadium saga and the A’s search for a new ballpark, as well as the Oakland Police Department and police reform efforts. He was part of the East Bay Times staff honored with the Pulitzer Prize in Breaking News for coverage of the Ghost Ship warehouse fire.",
		"sameAs": [
			"https://twitter.com/daviddebolt"
		],
		"url": "https://oaklandside.org/author/david-debolt/"
	}
]
</script>

jdevalk avatar Jul 22 '22 21:07 jdevalk

You're outputting both WebPage and NewsArticle in the same block, and that's potentially problematic for us as well.

Everything seems to conform to our spec - https://www.parse.ly/help/integration/jsonld - but having both of those types in the same block could potentially cause some issues.

arhine avatar Jul 22 '22 21:07 arhine

Hmmm well that's a bit harder to fix... I think you will run into similar issues with other SEO plugins... Honestly the best solution would be fixing that parser.

jdevalk avatar Jul 22 '22 21:07 jdevalk

Definitely appreciate the feedback. We're fortunate enough to work with a number of leading SEO teams at the world's top publishers, many of whom run your excellent plugin, and none have offered this feedback to date. But we're always eager to imrpove things for our publishers and I'll be certain to share this feedback with our product and engineering team, which may just be the best in the business. They'll definitely review and determine any course of action that is needed.

arhine avatar Jul 22 '22 21:07 arhine

Hello and thanks to everyone for the participation!

Until we get further movement regarding this, I'll flag this issue as awaiting for feedback.

acicovic avatar Jul 25 '22 08:07 acicovic