Page MenuHomePhabricator

DiscussionTools shows a regular topic as a template (coffee-roll) content
Closed, ResolvedPublicBUG REPORT

Description

Steps to replicate the issue (include links if applicable):

  • Check the API here, the first section "Your recent edits" section title is shown in othercontent field.
  • Check the desktop user talk here, you will notice that the "Your recent edits" is a regular topic.

What happens?:

  • The "Your recent edits" shows as a template topic and shows twice in the API response.

1658865837447.jpg (880×1 px, 242 KB)

What should have happened instead?:

  • It should show as a regular topic item instead.

Event Timeline

DLynch subscribed.

Issue's that the code that builds othercontent isn't coping well with a completely empty first placeholder section, and is sucking in the HTML for the heading. Presumably because of an assumption somewhere that a nextSibling couldn't possible be outside the section.

Change 817816 had a related patch set uploaded (by DLynch; author: DLynch):

[mediawiki/extensions/DiscussionTools@master] API ThreadItemsHTML: only add initial placeholder if there's content

https://gerrit.wikimedia.org/r/817816

It was actually more complicated than I thought. That patch (a) changes how the othercontent is generated to make it much less likely to pull in bits of the heading at the edge of the section, and (b) tries to only add the initial placeholder heading if there's content to put in it. (But it has a fairly expansive definition of "content".)

Change 817816 merged by jenkins-bot:

[mediawiki/extensions/DiscussionTools@master] API ThreadItemsHTML: improve generation of othercontent

https://gerrit.wikimedia.org/r/817816