Page MenuHomePhabricator

False positive Linter "fostered content" errors apparently caused by noinclude tags
Closed, ResolvedPublicBUG REPORT

Description

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

**Note: The error was not there yesterday; all fostered content errors in Template space had been fixed for many months.

What should have happened instead?:

  • No fostered content error should be reported.

Software version (on Special:Version page; skip for WMF-hosted wikis like Wikipedia):

Other information (browser name/version, screenshots, etc.):
This appears to be a regression. The problem also affects article-space pages like https://en.wikipedia.org/wiki/Line_4_(Shanghai_Metro) which was showing false positives for a while but disappeared from the error lists sometime in the past year.

Event Timeline

Yeah, this is because of https://github.com/wikimedia/mediawiki-services-parsoid/commit/41fb41a2ac54f8851d8d161fa1838207952acb61

It isn't a false positive. Rendering transparent tags are being fostered,

<meta typeof="mw:Includes/NoInclude/End" id="mwAw"/><meta typeof="mw:Includes/NoInclude" id="mwBA"/><table style="border:1px solid #8888aa; color:inherit; background-color:#f7f8ff; padding:5px; font-size:95%; margin: 0px 12px 12px 0px; width: 100%;" id="mwBQ">

Parsoid produces these markers but the legacy parser doesn't, so you wouldn't see them on Special:ExpandTemplates.

I got the balance wrong though. Include tags in the template namespace should be suppressed as they previous were in T162919.

Change #1052192 had a related patch set uploaded (by Arlolra; author: Arlolra):

[mediawiki/services/parsoid@master] Revert some of rendering transparent node linting

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

Possiby Related- T369354? I had fixed what I thought was a 'fostered-content' error, only for it turn into a 'missing-tag' error. The tag that is missing, is inside a noinclude.

Change #1052192 merged by jenkins-bot:

[mediawiki/services/parsoid@master] Skip linting rendering transparent nodes on template pages

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

Possiby Related- T369354? I had fixed what I thought was a 'fostered-content' error, only for it turn into a 'missing-tag' error. The tag that is missing, is inside a noinclude.

No, that seems like a duplicate of T348296

This may also be happening with <onlyinlcude>..</onlyinclude> tags.
see https://en.wikisource.org/w/index.php?title=Template:Information_field&action=edit&lintid=3152787

Adding line feeds as suggested elsewhere didn't help.

A related glitch..

https://en.wikisource.org/w/index.php?title=Page:A_Treatise_on_Electricity_and_Magnetism_-_Volume_2.djvu/15&oldid=14317206 reports fostered content.

https://en.wikisource.org/w/index.php?title=Page:A_Treatise_on_Electricity_and_Magnetism_-_Volume_2.djvu/15&oldid=14317209 doesn't.

The only things that's seemingly changed as far as I can tell is where whitespace or line feeds appears. It is UNACCEPTABLE to expect contributors to have make sweeping changes or play hunt the glitch repeatedly without good reason!!

Change #1052695 had a related patch set uploaded (by Jgiannelos; author: Jgiannelos):

[mediawiki/vendor@master] Bump wikimedia/parsoid to 0.20.0-a12

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

Change #1052695 merged by jenkins-bot:

[mediawiki/vendor@master] Bump wikimedia/parsoid to 0.20.0-a12

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

It is UNACCEPTABLE to expect contributors to have make sweeping changes or play hunt the glitch repeatedly without good reason!!

T369317#9955146 clearly states my culpability and T369317#9957368 is a patch reverting the recent change in reporting on template namespace pages. It will be rolled out in this week's train.

It appears that this patch has been deployed and has fixed most or all pages in template space. For some reason, at least some pages in article space are still reporting false positive fostered content errors. See, for example, https://en.wikipedia.org/wiki/List_of_Pomona_College_people.

Also https://en.wikipedia.org/wiki/Line_4_(Shanghai_Metro), as reported in the original bug report, is still reporting a false positive Linter fostered content error.

Not just article space, it appears: https://en.wikipedia.org/wiki/Wikipedia:Did_you_know/Statistics/Monthly_DYK_pageview_leaders/2018/June/Summary

I'm seeing the linter flag up stuff with <section> and <onlyinclude> tags, so the patch whilst welcomed, might need to be further tweaked.

https://en.wikisource.org/wiki/Page:The_English_housekeeper,_6th.djvu/422 (Section tags)...

I've also come across the following:
https://en.wikisource.org/w/index.php?title=Page:Dictionary_of_National_Biography_volume_02.djvu/12&action=edit&lintid=3526135 flagged as fostered for no obvious reason, I can determine. The construction used here is a commonplace usage on English Wikisource.

See also - T216350 which I thought had been solved.

I've also come across the following:
https://en.wikisource.org/w/index.php?title=Page:Dictionary_of_National_Biography_volume_02.djvu/12&action=edit&lintid=3526135 flagged as fostered for no obvious reason, I can determine. The construction used here is a commonplace usage on English Wikisource.

When Parsoid asks for the page content, it gets serialized as wikitext, with the header and footer wrapped in noinclude tags
https://github.com/wikimedia/mediawiki-extensions-ProofreadPage/blob/master/includes/Page/PageContentHandler.php#L128-L138

The common pattern of having a wikitext table split between these sections results in those tags being placed in fosterable position.

See also - T216350 which I thought had been solved.

Yeah, these recent changes have affected all rendering transparent tags, <section> extension tags included.

For some reason, at least some pages in article space are still reporting false positive fostered content errors.

The fix in T369317#9957368 only targeted the template namespace.

Also https://en.wikipedia.org/wiki/Line_4_(Shanghai_Metro), as reported in the original bug report, is still reporting a false positive Linter fostered content error.

I wanted to give further thought to the article space. That page in particular has a large block of,

<onlyinclude>
<onlyinclude>
<onlyinclude>
<onlyinclude>
<onlyinclude>
<onlyinclude>
<onlyinclude>
<onlyinclude>
<onlyinclude>

which didn't seem representative.

The goal in the patch from T290936#9935260 was to report all fostering, rendering transparent or not, for DiscussionTools. We could limit that to talk namespaces but I imagine there's going to be uses of include directives and other rendering transparent tags there as well and we'll be back here in a few weeks. Also, as in T360903#9662668, the use of __NEWSECTIONLINK__ means DiscussionTools isn't limited to talk namespaces.

Perhaps what's needed here is that we include some information with the lint if it's only composed of rendering transparent nodes and the UI for the Linter extension can filter them out.

Please restore the previous correct Linting functionality until you figure out a new way to manage these transparently rendering items. Right now, we have hundreds of false positives cluttering up the reports, which makes it difficult to find and fix actual errors.

I believe that I also saw this problem caused by __NOTOC__ which is code that could be in pretty much any namespace, so filtering by namespace is probably not going to work.

Change #1054407 had a related patch set uploaded (by Arlolra; author: Arlolra):

[mediawiki/services/parsoid@master] Revert linting fostered rendering transparent nodes

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

I believe that I also saw this problem caused by NOTOC which is code that could be in pretty much any namespace, so filtering by namespace is probably not going to work.

The irony is that __NOTOC__ from T290936 is exactly the one we want to detect.

Please restore the previous correct Linting functionality until you figure out a new way to manage these transparently rendering items.

I've uploaded a patch to revert all the changes in T369317#9983801. I'm really sorry for the disruption.

I think the way forward may be to introduce a new hidden lint category, "fostered-transparent", that reports these lints separately from "fostered".

Change #1054409 had a related patch set uploaded (by Arlolra; author: Arlolra):

[mediawiki/services/parsoid@master] [WIP ]Emit fostered rendering transparent lints as separate category

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

Thank you for the patch. I would support a separate fostered-transparent lint category. It should be low priority or just a tracking category when it starts, as it will probably list some false positives that either can't be "fixed" or do not need to be "fixed".

Change #1054407 merged by jenkins-bot:

[mediawiki/services/parsoid@master] Revert linting fostered rendering transparent nodes

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

Change #1055878 had a related patch set uploaded (by Isabelle Hurbain-Palatin; author: Isabelle Hurbain-Palatin):

[mediawiki/vendor@master] Bump wikimedia/parsoid to 0.20.0-a14

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

Change #1055878 merged by jenkins-bot:

[mediawiki/vendor@master] Bump wikimedia/parsoid to 0.20.0-a14

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

The revert was deployed and T371142 was created to lint rendering transparent nodes as a separate hidden category. Sorry for the disruption everyone.

Change #1057265 had a related patch set uploaded (by Arlolra; author: Arlolra):

[mediawiki/extensions/Linter@master] Add a "fostered-transparent" lint category

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

Change #1057265 merged by jenkins-bot:

[mediawiki/extensions/Linter@master] Add a "fostered-transparent" lint category

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

Change #1054409 merged by jenkins-bot:

[mediawiki/services/parsoid@master] Emit fostered rendering transparent lints as a separate category

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

Change #1063811 had a related patch set uploaded (by Subramanya Sastry; author: Subramanya Sastry):

[mediawiki/vendor@master] Bump wikimedia/parsoid to 0.20.0-a17

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

Change #1063811 merged by jenkins-bot:

[mediawiki/vendor@master] Bump wikimedia/parsoid to 0.20.0-a17

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