Page MenuHomePhabricator

Tracking category "Talk pages with comments before the first section" (discussiontools-comments-before-first-heading-category) is disappearing from some pages
Open, Needs TriagePublicBUG REPORT

Description

I was pinged in some on-wiki discussions:
https://en.wikipedia.org/wiki/Category_talk:Talk_pages_with_comments_before_the_first_section#c-Masterhatch-20260511180000-Jlwoodwa-20240421080500
https://en.wikipedia.org/wiki/Wikipedia:Village_pump_(technical)#The_mysteriously_shrinking_Category:Talk_pages_with_comments_before_the_first_section

It's plausible that this has something to do with the Parsoid rollout. I haven't stayed up-to-date with the Parsoid/DiscussionTools integration, so I'm not in the best position to investigate, but perhaps someone else can have a look.

Event Timeline

Steps to reproduce:

  1. Enable "Show hidden categories" at https://en.wikipedia.org/wiki/Special:Preferences#mw-prefsection-rendering
  2. Pick any page in https://en.wikipedia.org/wiki/Category:Talk_pages_with_comments_before_the_first_section
  3. Make a null edit or any other edit of the page
  4. Reload the category page

The category is still displayed on the edited page but the page is no longer displayed in the category.

Addition 10 July 2026:
The category still showed thousands of pages yesterday but none now. Category snapshot from 26 June 2026: https://web.archive.org/web/20260626102735/https://en.wikipedia.org/wiki/Category:Talk_pages_with_comments_before_the_first_section
Example pages still showing the category on them:

Izno changed the subtype of this task from "Task" to "Bug Report".May 26 2026, 12:49 AM
Izno subscribed.

Some background: The tracking category was added for T324139: When the lede section has comments, they should not be pulled into the "Learn more" popup. It’s disabled by default, but can be enabled by creating MediaWiki:Discussiontools-comments-before-first-heading-category. The tracking category is added in rEDTO includes/CommentFormatter.php:445 (at 8a18c123d37a5bf8cabce1f35d913e6f72ea8247), which is called from two hook handlers living in rEDTO includes/Hooks/ParserHooks.php (at 8a18c123d37a5bf8cabce1f35d913e6f72ea8247): one for ParserOutputPostCacheTransform and one for ParserAfterTidy.

As far as I remember, ParserAfterTidy is legacy parser-only, which may explain the difference, though ParserOutputPostCacheTransform should also run on Parsoid parses (the PHPDoc of the hook handler in DiscussionTools even says it runs only on Parsoid HTML for now). Maybe ParserOutputPostCacheTransform is too late for the tracking category to be recorded in the database?

@cscott pinging you because you probably have more opinions than I do on the matter - but I could see a scenario where categories added during post-processing wouldn't be taken into account when doing linkupdate, or something like that - what do you think?
(in which case this would have less to do with Parsoid per se than with the fact that we moved stuff around to a later hook)

This comment was removed by neriah.

in the past this worked and now it doesn't (see T431788), adding Regression