Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rich Snippet Tool interprets FAQPage in breadcrumb wrong #101

Closed
brotkrueml opened this issue Oct 28, 2022 · 1 comment
Closed

Rich Snippet Tool interprets FAQPage in breadcrumb wrong #101

brotkrueml opened this issue Oct 28, 2022 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@brotkrueml
Copy link
Owner

When a page uses FAQPage as WebPage type then the FAQPage is also available in the breadcrumb as type for that page, e.g.:

{
	"@context": "https://schema.org/",
	"@graph": [
		{
			"@type": "FAQPage",
			"breadcrumb": {
				"@type": "BreadcrumbList",
				"itemListElement": [
					{
						"@type": "ListItem",
						"item": {
							"@type": "WebPage",
							"@id": "https://www.domain.de/1.php"
						},
						"name": "1",
						"position": "1"
					},
					{
						"@type": "ListItem",
						"item": {
							"@type": "WebPage",
							"@id": "https://www.domain.de/1/2.php"
						},
						"name": "2",
						"position": "2"
					},
					{
						"@type": "ListItem",
						"item": {
							"@type": "FAQPage",
							"@id": "https://www.domain.de/1/2/3.php"
						},
						"name": "3",
						"position": "3"
					}
				]
			},
			"mainEntity": {
				"@type": "Question",
				"acceptedAnswer": {
					"@type": "Answer",
					"text": "<p>...</p>"
				},
				"name": "What is the reason of life?"
			}
		}
	]
}

Now the Rich Snippet Testing Tool complaints about this structure:

Field "mainEntity" is missing
Field "FAQPage" is double available

Appearently, the scope is not taken into the account.

As a quick fix, a possible subtype is removed from the breadcrumb and always WebPage used.

brotkrueml added a commit that referenced this issue Oct 28, 2022
@fnagel
Copy link

fnagel commented Oct 28, 2022

Tested this in TYPO3 11.5.17 and now the Google tests are green again :-)

Thanks a lot!

brotkrueml added a commit that referenced this issue Oct 28, 2022
@brotkrueml brotkrueml pinned this issue Oct 28, 2022
@brotkrueml brotkrueml self-assigned this Oct 28, 2022
@brotkrueml brotkrueml added the bug Something isn't working label Oct 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants