wordpress-seo
wordpress-seo copied to clipboard
mainEntity field is required error when Page type is set to FAQ page and no FAQ block present
Moved from: https://yoast.atlassian.net/browse/IM-940 Reporter: @dariaknl
Description
We frequently get support tickets from users having Google Search Console report an issue with a FAQpage on their site. They set a page to FAQpage, but never added a FAQ block to the page content.
To Reproduce
Step-by-step reproduction instructions
- Make a page and set the page schema to FAQpage
- Don't add a Yoast FAQ block to the page
- Copy our schema output on the page source and test it in the RRTT (https://search.google.com/test/rich-results)
- See critical error:
Expected results
Valid Schema
Actual results
Invalid Schema.
Workaround
Either unset FAQpage as schema page type, or add FAQ block in the content. We should try to either output a notice that when they do choose FAQpage as their type, or only allow selecting FAQpage as type if there is already a FAQblock on the page.
When you add our FAQ block to a page, and you let your Schema page type to default (Webpage) - we will output "@type":["WebPage","FAQPage"]
- so maybe let's remove the option altogether?
cc: @jonoalderson
Please inform the customer of conversation # 879553 when this conversation has been closed.
+1 https://wordpress.org/support/topic/erro-mainentity-no-yoast-seo-elementor-pro/
+1 https://wordpress.org/support/topic/erro-mainentity-no-yoast-seo-elementor-pro/
Not working again
Missing field “mainEntity” FAQ Schema Search Console Error
Step-by-step reproduction instructions
- Use the link: https://search.google.com/test/rich-results/result/r%2Ffaq?id=2MqZVnvEgfFwUPr6NZWNDQ
- FaqPage Schema had en error, missing field “mainEntity” FAQ
Expected results
- With mainEntity
Actual results: Screenshots, screen recording, code snippet
Sorry for the duplication: https://github.com/Yoast/wordpress-seo/issues/20350
Hi there, I resolved this issue using this guide:
https://yoast.com/how-to-build-an-faq-page/
Check if you use the "FAQ Block" element in the page before adding the Schema.
I hope can help also you.
What if people have FAQs on pages built with site builders that don't allow WordPress blocks? (I am in this situation) Shouldn't there be a solution for that case, too?
Hi @Magganpice
If you are not using our FAQ block, the FAQ schema won't be outputted on the page. In that case, we recommend you to please refer to our Schema API for all of the available documentation in modifying the default schema graph - Schema API.
Please inform the customer of conversation # 1123776 when this conversation has been closed.
Needs more product/UX input.