Richie
(Richie Rich)
April 5, 2026, 7:44am
1
Further to this bug last week:
Continuing the discussion from Either 'acceptedAnswer' or 'suggestedAnswer' should be specified :
I had this issue pop today suddenly after updating to this week’s latest build.
Any thoughts as to why it suddenly started? The site has been around for a decade and so has the page that’s affected by it. The topic has only one post (wiki) from the admin (it’s a notice FAQ topic).
And:
main ← fix/qa-page-schema-no-answers
merged 01:02PM - 02 Apr 26 UTC
Google Search Console reports acceptedAnswer/suggestedAnswer errors on topics th… at emit QAPage structured data with answerCount:0 and neither field present. This affects single-post topics, topics where the only replies are hidden or small action posts, and topics whose accepted answer has been hidden.
The fix introduces two checks:
1. A `has_eligible_answers?` query in SchemaUtils that verifies at least one visible, regular-type reply exists before emitting QAPage schema (both JSON-LD and microdata). Topics without eligible answers fall back to the default DiscussionForumPosting schema.
2. A `has_answers` policy in BuildSchemaMarkup that gates on the materialized accepted_answer/suggested_answers after they've been fetched, catching any edge cases the topic-level check might miss.
Additionally, `fetch_accepted_answer` now checks post visibility via `Guardian.new.can_see_post?` (anonymous perspective) so hidden accepted answers are excluded from schema output rather than being advertised to search engines. The `"answered only"` setting also uses this visibility check instead of just testing whether an answer_post_id exists.
https://meta.discourse.org/t/399525
I updated this morning to 2026.4.0-latest (97400099a5 ) but I’m still unable to validate the fixes with Google
My Google search console is showing:
Clicking through to the validation / fix steps:
And when I try to validate any of the fixes:
I get the same “affected pages were found” error for all three types.
Have I missed something?
2 Likes
davidb
(David B)
April 6, 2026, 10:44am
2
Thank you for reporting, we are looking into this issue and should have an update soon.
4 Likes
Richie
(Richie Rich)
April 6, 2026, 11:41am
3
Thanks @davidb very grateful
davidb
(David B)
April 7, 2026, 4:09pm
5
I merged a change that should fix most of the errors you are seeing (ie. missing name/answerCount). It turned out these values were missing from the microdata:
https://github.com/discourse/discourse/commit/6e8876152c45c2bd7c2f1c0eb6a248f47de9f89c
The 3 problem urls in the last image appear to be a separate issue, 2 of them are emoji only posts with no text and the third is an image only post. But I ran them through the Schema markup validator by pasting the page source and all appear to have zero warnings or errors.
Possibly these 3 page issues will clear on a re-crawl.
5 Likes
Richie
(Richie Rich)
April 8, 2026, 12:45pm
6
Thanks David
Will update Discourse again on Friday and re-try
1 Like
3 errors seem to be fixed, but 1 is remaining + 6 lesser severity annotations, all about missing fields within the suggested/acceptedAnswer elements:
Validation started means the issue is solved. “Not Started” means I couldn’t start it, since the quick initial validation still fond these issues, and I could verify that in the actual page source.
The “text” and “datePublished” fields were actually added to tests with the commit (and our instance contains that commit), but probably at the wrong element? E.g. “datePublished” is expected at the mainEntity, while the tests check it at the suggested/acceptedAnswer?
2 Likes
Richie
(Richie Rich)
April 9, 2026, 1:42pm
8
Could we not auto-close this topic just yet, please?
1 Like
davidb
(David B)
April 9, 2026, 1:43pm
9
Thank you for sharing, I will take a look into this soon and drop another update.
2 Likes