wordpress-seo icon indicating copy to clipboard operation
wordpress-seo copied to clipboard

mainEntity field is required error when Page type is set to FAQ page and no FAQ block present

Open jeroenrotty opened this issue 1 year ago • 9 comments

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

  1. Make a page and set the page schema to FAQpage
  2. Don't add a Yoast FAQ block to the page
  3. Copy our schema output on the page source and test it in the RRTT (https://search.google.com/test/rich-results)
  4. See critical error: 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

jeroenrotty avatar Apr 27 '23 13:04 jeroenrotty

Please inform the customer of conversation # 879553 when this conversation has been closed.

jeroenrotty avatar Apr 27 '23 14:04 jeroenrotty

+1 https://wordpress.org/support/topic/erro-mainentity-no-yoast-seo-elementor-pro/

maybellyne avatar Apr 27 '23 15:04 maybellyne

+1 https://wordpress.org/support/topic/erro-mainentity-no-yoast-seo-elementor-pro/

Not working again

jessica-capuozzo avatar May 23 '23 12:05 jessica-capuozzo

Missing field “mainEntity” FAQ Schema Search Console Error

Step-by-step reproduction instructions

  1. Use the link: https://search.google.com/test/rich-results/result/r%2Ffaq?id=2MqZVnvEgfFwUPr6NZWNDQ
  2. FaqPage Schema had en error, missing field “mainEntity” FAQ

Expected results

  1. With mainEntity

Actual results: Screenshots, screen recording, code snippet

image

Sorry for the duplication: https://github.com/Yoast/wordpress-seo/issues/20350

jessica-capuozzo avatar May 23 '23 12:05 jessica-capuozzo

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.

jessica-capuozzo avatar Aug 03 '23 12:08 jessica-capuozzo

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?

Magganpice avatar Mar 27 '24 09:03 Magganpice

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.

josevarghese avatar Apr 03 '24 10:04 josevarghese

Please inform the customer of conversation # 1123776 when this conversation has been closed.

ogodoabiola avatar Apr 11 '24 07:04 ogodoabiola

Needs more product/UX input.

pls78 avatar Apr 30 '24 09:04 pls78