Page MenuHomePhabricator

cscott (C. Scott Ananian)
Parser whisperer

Projects (24)

Today

  • No visible events.

Tomorrow

  • No visible events.

Monday

  • No visible events.

User Details

User Since
Oct 21 2014, 6:47 PM (611 w, 3 d)
Availability
Available
IRC Nick
cscott
LDAP User
C. Scott Ananian
MediaWiki User
Cscott [ Global Accounts ]

Editor since 2005; WMF developer since 2013. I work on Parsoid and OCG, and dabble with VE, real-time collaboration, and OOjs.

On github: https://github.com/cscott

See https://en.wikipedia.org/wiki/User:cscott for more.

Recent Activity

Wed, Jul 8

cscott added a comment to T36514: The language and the direction of the title in first heading should depend on page content language instead of user interface language.

In https://gerrit.wikimedia.org/r/c/mediawiki/core/+/1308173 it was proposed to only wrap the title (not the namespace) in language tags. I don't think this is correct as-is, but it may be worth recognizing "canonical" namespaces specifically and adding language=en dir=ltr to those, to properly deal with that specific corner case.

Wed, Jul 8, 7:28 PM · MW-1.46-notes (1.46.0-wmf.26; 2026-04-28), Content-Transform-Team (Work In Progress), Essential-Work, Patch-For-Review, RTL, I18n, MediaWiki-Internationalization

Mon, Jul 6

cscott added a comment to T350952: After fixing subpage links in Parsoid read views, TOC links are broken.

Filed T431358: Use PROTO_CANONICAL instead of PROTO_RELATIVE in ExpandRelativeAttrs and T431359: Parsoid should consistently use `_` instead of ` ` in wikilink URLs as action items.

Mon, Jul 6, 10:52 PM · MW-1.42-notes (1.42.0-wmf.5; 2023-11-14), Parsoid-Read-Views (DiscussionTools), Content-Transform-Team-WIP, Parsoid
cscott created T431359: Parsoid should consistently use `_` instead of ` ` in wikilink URLs.
Mon, Jul 6, 10:52 PM · Essential-Work, Content-Transform-Team (Work In Progress), Parsoid
cscott created T431358: Use PROTO_CANONICAL instead of PROTO_RELATIVE in ExpandRelativeAttrs.
Mon, Jul 6, 10:50 PM · Essential-Work, User-notice, MW-1.47-notes (1.47.0-wmf.11; 2026-07-14), Patch-For-Review, MediaWiki-ContentHandler, Content-Transform-Team (Work In Progress)
cscott added a comment to T350952: After fixing subpage links in Parsoid read views, TOC links are broken.

My recollection is that it wasn't just TOCs, a lot of skin code and user gadgets also assumed that the base href of the page was unmodified. Setting the base href to something "unexpected" broke a *lot* of things on subpages; the TOC links were just the thing which got written into the phab task.

Mon, Jul 6, 7:22 PM · MW-1.42-notes (1.42.0-wmf.5; 2023-11-14), Parsoid-Read-Views (DiscussionTools), Content-Transform-Team-WIP, Parsoid

Thu, Jul 2

cscott added a comment to T429408: On wikis with Parsoid read views enabled, Parsoid isn't consistently used for previews.

Yeah, like I said, it was added for DiscussionTools and I could easily agree that it was added in the wrong spot in retrospect. But IIRC it was added there at the time specificially because it *didn't* affect as many places as WikiPage and so seemed 'safer'.

Thu, Jul 2, 7:00 PM · OKR-Work, MW-1.47-notes (1.47.0-wmf.9; 2026-06-30), Patch-For-Review, Content-Transform-Team (Work In Progress)
cscott added a comment to T387374: Compound templates prevent section edit links where legacy adds them.

Verified that https://test.wikipedia.org/wiki/User:Cscott/T387374 seems to work with -a14

Thu, Jul 2, 8:21 AM · OKR-Work, MW-1.47-notes (1.47.0-wmf.8; 2026-06-23), Content-Transform-Team (Work In Progress), Parsoid-Read-Views (Small Size Wikipedias), Parsoid
cscott added a comment to T430778: Wikimedia\Assert\PreconditionException: Precondition failed: This Title instance does not represent a proper page, but merely a link target..

Above patch should fix the remaining failures. If I can get it reviewed, I'll backport it in the morning window.

Thu, Jul 2, 4:25 AM · Essential-Work, MW-Interfaces-Team, MediaWiki-REST-API, MW-1.47-notes (1.47.0-wmf.10; 2026-07-07), Content-Transform-Team (Work In Progress), Patch-For-Review, Wikidata, Wikimedia-production-error
cscott added a comment to T429408: On wikis with Parsoid read views enabled, Parsoid isn't consistently used for previews.

In retrospect it is likely the ArticleParserOptions hook should have been added to WikiPage instead of Article, but as I understand it the migration to WikiPage was never completed. Perhaps by the time that Article is finally deprecated and removed we can deprecate and remove the ArticleParserOptions hook as well, but in the short term while Article (and ArticleParserOptions) exists, it seems like the right move is to use it.

Thu, Jul 2, 2:50 AM · OKR-Work, MW-1.47-notes (1.47.0-wmf.9; 2026-06-30), Patch-For-Review, Content-Transform-Team (Work In Progress)
cscott added a comment to T429408: On wikis with Parsoid read views enabled, Parsoid isn't consistently used for previews.

The ideal solution for previews (and other places where we do wt2html transforms) is to ensure that any code constructing a ParserOptions object consults ParserMigration to set the useParsoid flag in the parser options object. Currently, this happens via the onArticleParserOptions hook handler in the ParserMigration extension. *However*, in a number of places in core and extensions, a parser options object is created via the WikiPage::makeParserOptions call where there is no Article object present, and the onArticleParserOptions handler signature requires an Article (which is used by some extensions like DiscussionTools).

Thu, Jul 2, 2:10 AM · OKR-Work, MW-1.47-notes (1.47.0-wmf.9; 2026-06-30), Patch-For-Review, Content-Transform-Team (Work In Progress)

Wed, Jul 1

cscott added a comment to T430778: Wikimedia\Assert\PreconditionException: Precondition failed: This Title instance does not represent a proper page, but merely a link target..

WRT the root issue here, https://www.wikidata.org/w/rest.php/v1/revision/2512536582/html is asking for https://www.wikidata.org/w/index.php?title=Q20826935&action=info which is content model "wikibase item" and I don't think the REST API was every supposed to support returning HTML content for titles which were not "wikitext" content model. I'm consulting with folks on slack to figure out what that query is "supposed" to return, but it seems to be undocumented behavior.

Wed, Jul 1, 11:31 PM · Essential-Work, MW-Interfaces-Team, MediaWiki-REST-API, MW-1.47-notes (1.47.0-wmf.10; 2026-07-07), Content-Transform-Team (Work In Progress), Patch-For-Review, Wikidata, Wikimedia-production-error
cscott added a comment to T430778: Wikimedia\Assert\PreconditionException: Precondition failed: This Title instance does not represent a proper page, but merely a link target..

The initial patch wont fix the production issue. Here is some more details after debugging. From the parseroutput API we can get details about what the parseroutput has for the failing page:
https://www.wikidata.org/w/api.php?action=parse&format=json&formatversion=2&page=Q21039773&parser=parsoid&prop=parseroutput

More specifically, we can see that the check if the title exists fails because:

  • The parseroutput title is bogus: "Badtitle/dummy_title_for_API_calls_set_in_api.php"
  • The namespace is -1 (special)

But the revision id is valid so eventually after the fix the getRevisionById would also fail (as @neriah pointed out)
I sent a follow up patch that puts a guard on the lookup as well.

Wed, Jul 1, 11:23 PM · Essential-Work, MW-Interfaces-Team, MediaWiki-REST-API, MW-1.47-notes (1.47.0-wmf.10; 2026-07-07), Content-Transform-Team (Work In Progress), Patch-For-Review, Wikidata, Wikimedia-production-error

Tue, Jun 30

cscott added a comment to T430759: Modules that inspect wikitext might run into opaque Parsoid fragment markers.

It's possible that we could support the horrible enwiktionary hacks, now that we are also putting heading information into strip markers...

Tue, Jun 30, 11:29 PM · Essential-Work, Content-Transform-Team (Work In Progress), Parsoid

Fri, Jun 26

cscott added a comment to T430344: Parsoid displays first used template as page title (instead of page title).

Ok, the title is a translatble part of the page, when the translate extension is installed, and the translation is done by a pseudo-section in the translations called "Page display title". You can edit the translation like: https://www.mediawiki.org/w/index.php?title=Special%3ATranslate&group=page-Content+Transform+Team&action=page&filter=&action_source=translate_page&language=es
and the bug is coming up when the title has *not* been explicitly translated, and so translate is attempting to fall back to the "real" page title -- instead of just not setting displaytitle in the first place, which is probably what it *should* do when no translation exists.

Fri, Jun 26, 6:22 PM · Content-Transform-Team (Work In Progress), Parsoid
cscott added a comment to T430344: Parsoid displays first used template as page title (instead of page title).

I think the translate extension is getting confused, since https://www.mediawiki.org/wiki/Content_Transform_Team/de contains the correct (translated) name while https://www.mediawiki.org/wiki/Content_Transform_Team/es does not.

Fri, Jun 26, 5:57 PM · Content-Transform-Team (Work In Progress), Parsoid
cscott added a comment to T424197: Experimenting with cross-wiki code collaboration.

It would be nice to allow @tstarling to participate remotely in this session from Sydney, Australia, and having this session between 11am-3pm Paris time would be most likely to let him do that.

Fri, Jun 26, 2:49 AM · Wikimedia-Hackathon-2026, Wikimania-Hackathon-2026
cscott added a comment to T415591: Template source used in shadow attribute.

Part of the problem here is that tokens are not really meant for direct conversion back to source text. We could use DSR ranges to extract the source text (assuming accurate Source values are maintained), and the PFragment-extension-tags patch series would also solve this by not tokenizing transclusion arguments until they are actually used, so we'd have access to the raw text still. But of course the raw text a nested extension tag gets is not guaranteed to be related to anything directly typed by the editor, nor to the value the extension gets: {{#tag:pre|{{{1}}}}} might be the extsrc but it's not the value that would actually be parsed after the source was expanded.

Fri, Jun 26, 1:55 AM · Patch-For-Review, Parsoid

Thu, Jun 25

cscott added a comment to T423917: 1.47.0-wmf.8 deployment blockers.
  1. Risky Patch! 🚂🔥
Thu, Jun 25, 7:50 PM · User-brennen, Release-Engineering-Team (Priority Backlog 📥), Release, Train Deployments
cscott created T430194: Parsoid Read Views deploy to English Wikipedia (enwiki) June 25-June 30.
Thu, Jun 25, 4:47 PM · Parsoid-Read-Views (Wikipedia follow-up), Content-Transform-Team (Work In Progress), OKR-Work
cscott added a comment to T415591: Template source used in shadow attribute.

Another case, falling out from T429624, {{#tag:references|<ref name="a">a</ref><ref details="p1" name="b">b</ref>}} generates "extsrc":"{{#parsoid\u0000fragment}}{{#parsoid\u0000fragment}}" because the internal ExtTagPFragment tokens leak into the extsrc attribute.

Thu, Jun 25, 4:14 PM · Patch-For-Review, Parsoid

Wed, Jun 24

cscott renamed T430092: Wikimedia Global Search won't let me log in (all mediawiki/oauthclient users broken) from Wikimedia Global Search won't let me log in (all mediawiki/oauth clients broken) to Wikimedia Global Search won't let me log in (all mediawiki/oauthclient users broken).
Wed, Jun 24, 9:54 PM · MediaWiki-Platform-Team, MediaWiki-extensions-OAuth, Patch-For-Review, Tool-global-search
cscott renamed T430092: Wikimedia Global Search won't let me log in (all mediawiki/oauthclient users broken) from Wikimedia Global Search won't let me log in to Wikimedia Global Search won't let me log in (all mediawiki/oauth clients broken).
Wed, Jun 24, 9:54 PM · MediaWiki-Platform-Team, MediaWiki-extensions-OAuth, Patch-For-Review, Tool-global-search
cscott triaged T430092: Wikimedia Global Search won't let me log in (all mediawiki/oauthclient users broken) as Unbreak Now! priority.

Elevating priority because this breaks 3rd party login (including wmf cloud login) to Wikimedia servers for all downstream apps using the mediawiki/oauthclient package (and there's quite a lot of dependencies of that in https://packagist.org/packages/mediawiki/oauthclient/dependents?order_by=downloads ).

Wed, Jun 24, 9:51 PM · MediaWiki-Platform-Team, MediaWiki-extensions-OAuth, Patch-For-Review, Tool-global-search
cscott added a parent task for T430092: Wikimedia Global Search won't let me log in (all mediawiki/oauthclient users broken): T423917: 1.47.0-wmf.8 deployment blockers.
Wed, Jun 24, 9:48 PM · MediaWiki-Platform-Team, MediaWiki-extensions-OAuth, Patch-For-Review, Tool-global-search
cscott added a subtask for T423917: 1.47.0-wmf.8 deployment blockers: T430092: Wikimedia Global Search won't let me log in (all mediawiki/oauthclient users broken).
Wed, Jun 24, 9:48 PM · User-brennen, Release-Engineering-Team (Priority Backlog 📥), Release, Train Deployments
cscott added a comment to T430092: Wikimedia Global Search won't let me log in (all mediawiki/oauthclient users broken).

global search uses wikimedia/toolforge-bundle which uses mediawiki/oauthclient. And mediawiki/oauthclient uses format=json wouldn't you know.

Wed, Jun 24, 9:10 PM · MediaWiki-Platform-Team, MediaWiki-extensions-OAuth, Patch-For-Review, Tool-global-search
cscott updated subscribers of T430092: Wikimedia Global Search won't let me log in (all mediawiki/oauthclient users broken).

On IRC it was said:

if its a oauth1 user, it appears there was a bit of a surprise breaking change
bawolfs comment in -tech

Wed, Jun 24, 8:54 PM · MediaWiki-Platform-Team, MediaWiki-extensions-OAuth, Patch-For-Review, Tool-global-search
cscott created T430092: Wikimedia Global Search won't let me log in (all mediawiki/oauthclient users broken).
Wed, Jun 24, 8:49 PM · MediaWiki-Platform-Team, MediaWiki-extensions-OAuth, Patch-For-Review, Tool-global-search
cscott added a comment to T430069: Edge case / bug in id deduplication: running deduping across fragments embedded in data-mw can lead to false positives when that fragment is also part of the main doc (ex: indicators).

One option would be to *move* the fragment from the meta tag to the indicator, instead of *copying* it. Or at least removing the id from the meta tag once it is copied? (There's probably some issue here about DOM->HTML->DOM conversions which is why this is being cloned even without an explicit fragment clone operation.)

Wed, Jun 24, 5:48 PM · OKR-Work, MW-1.47-notes (1.47.0-wmf.9; 2026-06-30), Content-Transform-Team (Work In Progress), Parsoid-Read-Views
cscott added a comment to T93715: [EPIC] Make Parsoid HTML output completely deterministic.

This keeps surfacing every couple of years, mostly related to wanting to use parsoid IDs as stable element IDs (T116350: Design and implement an algorithm to provide stable element ids). Our current solution to this use case is T149667: Build an article annotation service which does the mapping between elements in different revisions (or different parses of the same revision) without requiring full determinism from the wikitext stack.

Wed, Jun 24, 3:47 PM · Epic, RESTBase, Parsoid

Tue, Jun 23

cscott added a comment to T414786: Fix parser parity when handling unclosed ref tags.

At the risk of throwing fuel on the fire, I'll note that extension tag syntax is deliberately designed[1] for embedding non-wikitext content inside wikitext, and so syntactically it deliberately ignores anything except the closing </ref>. There's some discussion about this here https://en.wikipedia.org/wiki/User:Cscott/Ideas/A_Dozen_Visions_for_Wikitext/Extension_tag_fragments as a proposal to both allow nesting and make it /actually/ able to contain arbitrary non-wikitext content (T393795, which has some initial support already).

Tue, Jun 23, 11:25 PM · Content-Transform-Team, WMDE-TechWish (product board), Cite, Parsoid-Rendering
cscott added a comment to T209394: Use sniff or phan rule to detect violations of Stable interface policy (@internal, @deprecated, @stable etc.).

I could easily add a check for extension.json and skin.json. That's more MediaWiki-specific, but this is a MediaWiki-specific plugin at this point (living in mediawiki-phan-config) anyway.

Tue, Jun 23, 6:19 PM · Patch-For-Review, phan, MediaWiki-Core-Tests
cscott added a comment to T429928: PHP Notice: Undefined property: MediaWiki\Parser\Parser::$useParsoidFragments.

I forgot to backport this when I backported the two other patches (https://gerrit.wikimedia.org/r/c/mediawiki/core/+/1305018 and https://gerrit.wikimedia.org/r/c/mediawiki/core/+/1305025 ) which depend on this.

Tue, Jun 23, 6:07 PM · MW-1.47-notes (1.47.0-wmf.7; 2026-06-16), Parsoid, MediaWiki-Parser, Wikimedia-production-error
cscott added a comment to T429928: PHP Notice: Undefined property: MediaWiki\Parser\Parser::$useParsoidFragments.

[[parser] Rename mStripExtTags to useParsoidFragments (1305223) · Gerrit Code Review](https://gerrit.wikimedia.org/r/c/mediawiki/core/+/1305223) will fix this.

Tue, Jun 23, 6:03 PM · MW-1.47-notes (1.47.0-wmf.7; 2026-06-16), Parsoid, MediaWiki-Parser, Wikimedia-production-error
cscott added a comment to T429928: PHP Notice: Undefined property: MediaWiki\Parser\Parser::$useParsoidFragments.

I'll fix this, it's my fault. :(

Tue, Jun 23, 6:01 PM · MW-1.47-notes (1.47.0-wmf.7; 2026-06-16), Parsoid, MediaWiki-Parser, Wikimedia-production-error
cscott added a comment to T429060: In Parsoid, when page contains __NOCONTENTCONVERT__, text inside `-{}-` should be rendered..

Note that the existing legacy behavior is to render this as -{Джордан}- -- that is, the actual -{ and }- brackets are rendered as well as the contents. The requested Parsoid behavior doesn't exactly match legacy behavior.

Tue, Jun 23, 5:23 AM · OKR-Work, Parsoid-Read-Views (Language Converter Support), Content-Transform-Team (Work In Progress), Patch-For-Review, Parsoid-Rendering, Serbian-Sites
cscott created T429860: DefaultOutputPipelineFactory: Make public methods for building specific pipelines.
Tue, Jun 23, 1:45 AM · Parsoid-Read-Views (Language Converter Support)

Mon, Jun 22

cscott triaged T429824: Gated extensions are blocked by corrupted npm tarball data as Unbreak Now! priority.

(Currently blocking all gate-and-submit to core)

Mon, Jun 22, 11:03 PM · ConfirmEdit (CAPTCHA extension), ci-test-error (WMF-deployed Build Failure)
cscott added a comment to T429824: Gated extensions are blocked by corrupted npm tarball data.

Now failing for mediawiki-core as well, eg https://integration.wikimedia.org/ci/job/mediawiki-node24/39102/console

Mon, Jun 22, 10:57 PM · ConfirmEdit (CAPTCHA extension), ci-test-error (WMF-deployed Build Failure)
cscott added a comment to T429749: Gerrit: network errors in CI.

I don't agree. I believe we are getting corruption due to the network problems. The corruption eventually causes npm to error out. Clearing the caches is a brute-force workaround to the problem of npm downloaded corrupted (truncated?) files from the buggy network connection.

Mon, Jun 22, 10:53 PM · Patch-For-Review, User-brennen, collaboration-services, Gerrit, ci-test-error (WMF-deployed Build Failure), Release-Engineering-Team, Continuous-Integration-Infrastructure
cscott added a comment to T429824: Gated extensions are blocked by corrupted npm tarball data.

@thcipriani how do you remove the cache for a job?

Mon, Jun 22, 10:24 PM · ConfirmEdit (CAPTCHA extension), ci-test-error (WMF-deployed Build Failure)
cscott added a comment to T429749: Gerrit: network errors in CI.

I think I just saw this in a patch to mediawiki-core as well?

18:03:21 npm warn tarball tarball data for @typescript-eslint/eslint-plugin@8.46.0 (sha512-hA8gxBq4ukonVXPy0OKhiaUh/68D0E88GSmtC1iAEnGaieuDi38LhS7jdCHRLi6ErJBNDGCzvh5EnzdPwUc0DA==) seems to be corrupted. Trying again.
18:03:31 npm error code ENOENT
18:03:31 npm error syscall stat
18:03:31 npm error path /cache/_cacache/content-v2/sha512/e4/7b/c83c8c01523a98983d7c98f4d2f65b38138df7250014c4374962a0a925d0789d457c0b931919e7c18a5503cb3d85f80ff2d0a6af8650a858788c38f1e02f
18:03:31 npm error errno ENOENT
18:03:31 npm error enoent Invalid response body while trying to fetch https://registry.npmjs.org/zip-stream: ENOENT: no such file or directory, stat '/cache/_cacache/content-v2/sha512/e4/7b/c83c8c01523a98983d7c98f4d2f65b38138df7250014c4374962a0a925d0789d457c0b931919e7c18a5503cb3d85f80ff2d0a6af8650a858788c38f1e02f'
18:03:31 npm error enoent This is related to npm not being able to find a file.

in https://integration.wikimedia.org/ci/job/mediawiki-node24/39071/ on https://gerrit.wikimedia.org/r/c/mediawiki/core/+/1271913

Mon, Jun 22, 10:22 PM · Patch-For-Review, User-brennen, collaboration-services, Gerrit, ci-test-error (WMF-deployed Build Failure), Release-Engineering-Team, Continuous-Integration-Infrastructure
cscott added a comment to T428105: Extension:Chart renders stray text above chart in Parsoid when field title contains "%".

Extension:Chart returns a raw HTML string from the parser function with (from ParserFunction.php):

		return [ $html, 'noparse' => true, 'isRawHTML' => true ];

support for which was added in Icb8eae for T381617. This gets tunneled through as a "nowiki" strip marker (but carefully disambiguated from an "actual" <nowiki>) and returned to Parsoid as a HtmlPFragment... which then gets embedded as a {{#parsoid\0fragment:...}} and tokenized as a a DOMFragment token via TokenizerUtils::parsoidFragmentMarkerToTokens(), wrapped in a new SelfclosingTagTk( 'template', [], $dp );.

Mon, Jun 22, 10:06 PM · Essential-Work, Content-Transform-Team (Work In Progress), Parsoid, Charts
cscott added a comment to T328012: Chinese Language Converter does not work in Extension:PageAssessments.

findVariantLink seems like exactly the right solution to me, and is how category links are resolved in the LinksUpdate jobs. @Winston_Sung can you explain why you think that wouldn't work?

Mon, Jun 22, 2:46 PM · Patch-For-Review, Chinese-Sites, MediaWiki-Language-converter, MediaWiki-extensions-PageAssessments

Sun, Jun 21

cscott added a comment to T209394: Use sniff or phan rule to detect violations of Stable interface policy (@internal, @deprecated, @stable etc.).

When run in mediawiki-core, a set of MediaWiki\* namespaces would be friends, but a call to an @internal method of Wikimedia\Parsoid would be flagged.

Not all of it – MediaWiki\Extension\* and MediaWiki\Skins\* should definitely not be friends, but there are also some extensions and skins that don’t have the Extension/Skin subnamespace, e.g. Babel chose MediaWiki\Babel\* and Minerva Neue is MediaWiki\Minerva\*.

Sun, Jun 21, 5:24 PM · Patch-For-Review, phan, MediaWiki-Core-Tests
cscott added a comment to T429411: Cite-Parsoid: Missing backlink anchors in some scenarios.

There might be some related commentary in https://pt.wikipedia.org/wiki/Wikip%C3%A9dia:Esplanada/geral/Se%C3%A7%C3%A3o_Refer%C3%AAncias_(19jun2026)?

Sun, Jun 21, 5:08 PM · OKR-Work, Parsoid-Read-Views (Wikipedia follow-up), Content-Transform-Team (Work In Progress), Cite
cscott added a comment to T429734: Templates generating <hN> inside content are not treated as section headings by Parsoid, breaking mobile collapsibility.

https://pt.wikipedia.org/wiki/Encounter_at_Farpoint and https://pt.wikipedia.org/wiki/601_Lexington_Avenue appear to work now?

Sun, Jun 21, 5:07 PM · MobileFrontend (MobileFormatter), Parsoid
cscott added a comment to T429734: Templates generating <hN> inside content are not treated as section headings by Parsoid, breaking mobile collapsibility.

Several pages have additionally been reported with broken <ref> group resolution in notes sections, possibly as a secondary consequence of Parsoid restructuring section scope.

Sun, Jun 21, 5:03 PM · MobileFrontend (MobileFormatter), Parsoid
cscott added a comment to T429734: Templates generating <hN> inside content are not treated as section headings by Parsoid, breaking mobile collapsibility.

If the section is expected to be in the table of contents, it should be in wikitext format, == ... ==, and that ought to imply that is is an editable section and also collapsable. Why is it so important that the section edit link be hidden for this section?

Sun, Jun 21, 4:59 PM · MobileFrontend (MobileFormatter), Parsoid
cscott added a comment to T429060: In Parsoid, when page contains __NOCONTENTCONVERT__, text inside `-{}-` should be rendered..

Seems related to T424391: Parsoid Language Converter doesn't convert rules inside -{ ... }- markup. Should be fixed in the core language converter implementation (T380517) not the Parsoid implementation, which will be removed shortly (T424409).

Sun, Jun 21, 4:52 PM · OKR-Work, Parsoid-Read-Views (Language Converter Support), Content-Transform-Team (Work In Progress), Patch-For-Review, Parsoid-Rendering, Serbian-Sites
cscott added projects to T324967: LanguageVariantConverter: allow conversion to be disabled reliably: Content-Transform-Team (Work In Progress), Parsoid-Read-Views (Language Converter Support).

Should be re-examined in light of T424408: Use new ParsoidLanguageConverter pass for REST page API and the recent "Shadow pages" support.

Sun, Jun 21, 4:51 PM · Essential-Work, Parsoid-Read-Views (Language Converter Support), Content-Transform-Team (Work In Progress), Serbian-Sites, Parsoid (Tracking), MediaWiki-Language-converter, RESTBase-Sunsetting
cscott moved T429060: In Parsoid, when page contains __NOCONTENTCONVERT__, text inside `-{}-` should be rendered. from Backlog to Needs Investigation on the Content-Transform-Team (Work In Progress) board.
Sun, Jun 21, 4:45 PM · OKR-Work, Parsoid-Read-Views (Language Converter Support), Content-Transform-Team (Work In Progress), Patch-For-Review, Parsoid-Rendering, Serbian-Sites
cscott closed T349137: Handle __NOCONTENTCONVERT__ in core, not Parsoid as Resolved.

Done as part of T424773: __NOCONTENTCONVERT__ is not honored in Parsoid and T373384: Parsoid doesn't properly handle double-underscore magic words.

Sun, Jun 21, 4:45 PM · Serbian-Sites, Parsoid
cscott added a comment to T424370: [SR] Language Converter should run only on pages in main namespace.

BTW, NOCONTENTCONVERT does not work in Parsoid

Sun, Jun 21, 4:43 PM · Serbian-Sites, MediaWiki-Language-converter
cscott added projects to T429060: In Parsoid, when page contains __NOCONTENTCONVERT__, text inside `-{}-` should be rendered.: Content-Transform-Team (Work In Progress), Parsoid-Read-Views (Language Converter Support).
Sun, Jun 21, 4:41 PM · OKR-Work, Parsoid-Read-Views (Language Converter Support), Content-Transform-Team (Work In Progress), Patch-For-Review, Parsoid-Rendering, Serbian-Sites
cscott added a project to T420668: RemexHTML should not add p for math elements within blockquote: Parsoid-Read-Views (Large Wikipedias).
Sun, Jun 21, 4:24 PM · OKR-Work, Parsoid-Read-Views (Wikipedia follow-up), Content-Transform-Team (Work In Progress), MediaWiki-Engineering, RemexHtml
cscott moved T420668: RemexHTML should not add p for math elements within blockquote from Backlog to Needs Investigation on the Content-Transform-Team (Work In Progress) board.
Sun, Jun 21, 4:23 PM · OKR-Work, Parsoid-Read-Views (Wikipedia follow-up), Content-Transform-Team (Work In Progress), MediaWiki-Engineering, RemexHtml
cscott moved T420668: RemexHTML should not add p for math elements within blockquote from Inbox to Vaguely Related on the RemexHtml board.
Sun, Jun 21, 4:23 PM · OKR-Work, Parsoid-Read-Views (Wikipedia follow-up), Content-Transform-Team (Work In Progress), MediaWiki-Engineering, RemexHtml
cscott edited projects for T420668: RemexHTML should not add p for math elements within blockquote, added: Content-Transform-Team (Work In Progress); removed Content-Transform-Team.
Sun, Jun 21, 4:23 PM · OKR-Work, Parsoid-Read-Views (Wikipedia follow-up), Content-Transform-Team (Work In Progress), MediaWiki-Engineering, RemexHtml
cscott added a comment to T429599: Create an llms.txt where honest robots can read our API Policy.

I'm surprised that the proposed standard doesn't use the https://en.wikipedia.org/wiki/Well-known_URI RFC.

Sun, Jun 21, 4:18 PM · Patch-For-Review, ServiceOps new

Fri, Jun 19

cscott added a comment to T209394: Use sniff or phan rule to detect violations of Stable interface policy (@internal, @deprecated, @stable etc.).

Implemented a version of this check; described in more detail at https://www.mediawiki.org/wiki/Continuous_integration/Phan/Plugins

Fri, Jun 19, 11:15 PM · Patch-For-Review, phan, MediaWiki-Core-Tests
cscott added a comment to T209394: Use sniff or phan rule to detect violations of Stable interface policy (@internal, @deprecated, @stable etc.).

Per-namespace @internal would work if we could define a set of "friend" namespaces. That is, when checking Parsoid, all namespaces under Wikimedia\Parsoid\* are considered "friends" and can call @internal methods defined in Wikimedia\Parsoid\*. (That is, Wikimedia\Parsoid\Wt2Html is a friend of Wikimedia\Parsoid\Utils and they can call each others @internal methods.) However, a call from Parsoid to an @internal method of \MediaWiki\Title (something outside the friend universe) would be flagged.

Fri, Jun 19, 3:32 PM · Patch-For-Review, phan, MediaWiki-Core-Tests
cscott added a comment to T68637: Make it possible to distinguish Wikitext headings and HTML headings.

The patches were tagged with T417531: Section wrapping should use precise information about HTML-syntax headings

Fri, Jun 19, 12:05 PM · MW-1.47-notes (1.47.0-wmf.6; 2026-06-09), MW-1.44-notes (1.44.0-wmf.27; 2025-04-29), MediaWiki-Parser
cscott claimed T429664: Remove hard-deprecated methods from OutputPage for MW 1.47.
Fri, Jun 19, 6:06 AM · MW-1.47-notes (1.47.0-wmf.9; 2026-06-30), Essential-Work, MediaWiki-General
cscott updated the task description for T429664: Remove hard-deprecated methods from OutputPage for MW 1.47.
Fri, Jun 19, 5:56 AM · MW-1.47-notes (1.47.0-wmf.9; 2026-06-30), Essential-Work, MediaWiki-General
cscott created T429664: Remove hard-deprecated methods from OutputPage for MW 1.47.
Fri, Jun 19, 5:50 AM · MW-1.47-notes (1.47.0-wmf.9; 2026-06-30), Essential-Work, MediaWiki-General

Thu, Jun 18

cscott added a comment to T429038: Parsoid Read Views to deploy ~2026-06-15.

Ok, the TemplateData extension looks for the section edit link and does a regex substitution on this, so this might actually be a subcase of the T422291: Wrong section edit link target with Parsoid when section is transcluded bug: if the section edit link is corrected, then the magic being done by the TemplateData extension might actually work.

Thu, Jun 18, 3:31 PM · Parsoid-Read-Views (Wikipedia follow-up), Content-Transform-Team (Work In Progress), OKR-Work
cscott added a comment to T429624: Link to edit TemplateData is broken with Parsoid Read Views.

The link to edit the templatedata is part of the content added by the <templatedata> extension tag, so it appears something is going wrong with the context we are giving that extension.

Thu, Jun 18, 2:47 PM · OKR-Work, MW-1.47-notes (1.47.0-wmf.9; 2026-06-30), Patch-For-Review, Parsoid, Content-Transform-Team (Work In Progress), Parsoid-Read-Views
cscott added a comment to T422291: Wrong section edit link target with Parsoid when section is transcluded.

It also has wrong links in Template data's edit button. The first image is Parsoid, the second image is the legacy parser. The example is from ukwiki.

image.png (486×137 px, 9 KB)

image.png (573×106 px, 10 KB)

Thu, Jun 18, 2:44 PM · Parsoid-Read-Views (Small Size Wikipedias), Parsoid
cscott created T429624: Link to edit TemplateData is broken with Parsoid Read Views.
Thu, Jun 18, 2:44 PM · OKR-Work, MW-1.47-notes (1.47.0-wmf.9; 2026-06-30), Patch-For-Review, Parsoid, Content-Transform-Team (Work In Progress), Parsoid-Read-Views
cscott added a comment to T429038: Parsoid Read Views to deploy ~2026-06-15.

Could you provide a link to a page which demonstrates the "Then there is a problem with TemplateData that also has an invalid link if you try to edit it from the documentation box." issue?

Thu, Jun 18, 2:31 PM · Parsoid-Read-Views (Wikipedia follow-up), Content-Transform-Team (Work In Progress), OKR-Work
cscott added a comment to T422291: Wrong section edit link target with Parsoid when section is transcluded.

Could we revert the deployment of Parsoid for ukwiki for now, before this ticket T422291 is fixed? Or prioritize resolving the ticket? Because a lot of documentation pages are broken, we prefer to have an edit link in the section, unlike enwiki, which has them only at the top of the documentation box. Then there is a problem with TemplateData that also has an invalid link if you try to edit it from the documentation box. And now users are complaining on the page Requests for administrator attention (https://uk.wikipedia.org/w/index.php?title=%D0%92%D1%96%D0%BA%D1%96%D0%BF%D0%B5%D0%B4%D1%96%D1%8F%3A%D0%97%D0%B0%D0%BF%D0%B8%D1%82%D0%B8_%D0%B4%D0%BE_%D0%B0%D0%B4%D0%BC%D1%96%D0%BD%D1%96%D1%81%D1%82%D1%80%D0%B0%D1%82%D0%BE%D1%80%D1%96%D0%B2&diff=48222382&oldid=48220768 Section «Захищена сторінка») that they cannot edit discusions on the page https://uk.wikipedia.org/wiki/%D0%92%D1%96%D0%BA%D1%96%D0%BF%D0%B5%D0%B4%D1%96%D1%8F:%D0%9F%D0%B5%D1%80%D0%B5%D0%B9%D0%BC%D0%B5%D0%BD%D1%83%D0%B2%D0%B0%D0%BD%D0%BD%D1%8F_%D1%81%D1%82%D0%B0%D1%82%D0%B5%D0%B9 through edit links, becuase the transcluded through template https://uk.wikipedia.org/wiki/%D0%A8%D0%B0%D0%B1%D0%BB%D0%BE%D0%BD:Rename.

image.png (331×122 px, 6 KB)

image.png (1,011×198 px, 16 KB)

Thu, Jun 18, 2:25 PM · Parsoid-Read-Views (Small Size Wikipedias), Parsoid
cscott added a comment to T429411: Cite-Parsoid: Missing backlink anchors in some scenarios.

The relevant wikitext is:

{{notelist|group=lower-roman|refs=
{{efn-lr|name="NB_Herkon"|Historically, the term ''Herkon relay'' was occasionally referred to as synonymous to ''reed relay'' even in the literature. "Herkon" was actually a [[Standard Elektrik Lorenz|SEL]]/[[International Telephone and Telegraph Corporation|ITT]] trademark standing for "[[hermetic seal|hermetically sealed]] contact".<ref name="Scheidig_1959"/><ref name="Steinbuch_1962"/><ref name="Schönemeyer_1964"/><ref name="Oden_1964"/><ref name="Steinbuch-Wagner_1967"/>}}
}}

which ultimately desugars into something like:

{{#tag:references|<ref name=...>...{{#tag:ref:...|name=foo}}</ref>}}

and then the later references section includes those embedded references from the notelist.

Thu, Jun 18, 2:21 PM · OKR-Work, Parsoid-Read-Views (Wikipedia follow-up), Content-Transform-Team (Work In Progress), Cite
cscott added a comment to T429411: Cite-Parsoid: Missing backlink anchors in some scenarios.

This is a ref-in-ref issue: the backlinks should point to an entry in the "Notes" section, which is itself a <ref>.

Thu, Jun 18, 2:15 PM · OKR-Work, Parsoid-Read-Views (Wikipedia follow-up), Content-Transform-Team (Work In Progress), Cite
cscott added a comment to T429550: PEG tokenization bug that impacts table cells.

I guess, if the -{ and }- were <b> and </b> we wouldn't have any problem saying that this was bogus, similar if this were [[ and ]]. I'd suggest we fix the wikitext.

Thu, Jun 18, 2:12 PM · OKR-Work, Parsoid-Read-Views (Wikipedia follow-up), Content-Transform-Team (Work In Progress), Parsoid
cscott added a comment to T429550: PEG tokenization bug that impacts table cells.

I'm not sure this isn't acceptable behavior for Parsoid. There's got to be some limit on what sort of construct you can get away with encapsulating with -{ ... }-. I think it's reasonable to say that the contents should be "balanced".

Thu, Jun 18, 2:09 PM · OKR-Work, Parsoid-Read-Views (Wikipedia follow-up), Content-Transform-Team (Work In Progress), Parsoid

Wed, Jun 17

cscott added a comment to T383004: Parsoid read views: map with extension (cite, templatestyles) in caption results in raw UNIQ QINU marker.

Minimized test case:

{{#tag:mapframe||text={{#tag:pre|San Francisco}}|width=350|height=350|zoom=13|longitude=-122.39953994750977|latitude=37.81032643553478}}

The {{#tag:pre}} returns a strip marker, which is then passed as the value of the text attribute to the <mapframe> and Parsoid loses track of it.

Wed, Jun 17, 10:04 PM · Parsoid-Read-Views (Large Wikipedias), OKR-Work, Content-Transform-Team (Work In Progress)
cscott added a comment to T393925: Parsoid should generate the <head> on the core side, from the ParserOutput metadata.

See also T122390: Is RDFa metadata in Parsoid HTML head actually useful to you / no user name & edit comment suppression in Parsoid <head> metadata for a historical discussion of the use of the HTML <head>; obviously time has passed since then and folks have new needs.

Wed, Jun 17, 7:35 PM · MW-1.47-notes (1.47.0-wmf.9; 2026-06-30), Patch-For-Review, MW-1.43-notes (1.43.0-wmf.23; 2024-09-17), Parsoid-Read-Views (Phase 4 - Parsoid generates metadata needed by core), Parsoid
cscott added a parent task for T91154: {{=}} should be a parser function: T429536: Add {{=}} and {{!}} as built-ins to the Parsoid tokenizer.
Wed, Jun 17, 7:33 PM · User-notice-archive, MW-1.39-notes (1.39.0-wmf.14; 2022-05-30), MW-1.36-notes (1.36.0-wmf.10; 2020-09-22), MediaWiki-Installer, MW-1.35-notes (1.35.0-wmf.40; 2020-07-07), MediaWiki-Page-editing, MediaWiki-Parser
cscott added a subtask for T429536: Add {{=}} and {{!}} as built-ins to the Parsoid tokenizer: T91154: {{=}} should be a parser function.
Wed, Jun 17, 7:33 PM · Essential-Work, Content-Transform-Team (Work In Progress), Parsoid
cscott created T429536: Add {{=}} and {{!}} as built-ins to the Parsoid tokenizer.
Wed, Jun 17, 7:33 PM · Essential-Work, Content-Transform-Team (Work In Progress), Parsoid
cscott added a parent task for T393925: Parsoid should generate the <head> on the core side, from the ParserOutput metadata: T429513: Add categories and page properties to the document head in Parsoid "full document" mode.
Wed, Jun 17, 7:14 PM · MW-1.47-notes (1.47.0-wmf.9; 2026-06-30), Patch-For-Review, MW-1.43-notes (1.43.0-wmf.23; 2024-09-17), Parsoid-Read-Views (Phase 4 - Parsoid generates metadata needed by core), Parsoid
cscott added a subtask for T429513: Add categories and page properties to the document head in Parsoid "full document" mode: T393925: Parsoid should generate the <head> on the core side, from the ParserOutput metadata.
Wed, Jun 17, 7:14 PM · MW-Interfaces-Team, MediaWiki-REST-API, Content-Transform-Team
cscott created T429513: Add categories and page properties to the document head in Parsoid "full document" mode.
Wed, Jun 17, 4:42 PM · MW-Interfaces-Team, MediaWiki-REST-API, Content-Transform-Team

Tue, Jun 16

cscott added a comment to T68637: Make it possible to distinguish Wikitext headings and HTML headings.

@Od1n DiscussionTools uses a fairly-complicated heuristic to determine whether a page "could be a discussion" since some discussions happen outside of the Talk: namespace. If you give specific examples I could probably check to see exactly what is triggering the heuristic in that case.

Tue, Jun 16, 9:23 PM · MW-1.47-notes (1.47.0-wmf.6; 2026-06-09), MW-1.44-notes (1.44.0-wmf.27; 2025-04-29), MediaWiki-Parser
cscott added a comment to T424399: shwiki uses unbalanced `-{` in Template:refbegin.

If we create {{refbegin2}} without the -{ and define (for transition purposes) {{refbegin}} as {{refbegin2}}-{ then editors can just use {{#subst:refbegin}} when they initially author the template. That also avoids "breaking" pages while the bot is running. Does that sound reasonable?

Tue, Jun 16, 7:47 PM · OKR-Work, Content-Transform-Team (Work In Progress), Parsoid-Read-Views (Language Converter Support)
cscott added a comment to T421524: Images with an original size less than 400px are scaled up by large thumbnail preference.

The primary disadvantage is that this requires exposing to the parser (parsoid) not only the "default" image size but also the small and large sizes in order to add all of the correct classes. I'd prefer not to add that complexity if we can avoid it; this reduces entanglement between the core parser and the thumbnail/media system.

Tue, Jun 16, 7:39 PM · Parsoid, Readers Essential Work (WE6.3.4 Fix bugs within the reading experience across platforms for Parsoid Read Views), MW-1.46-notes (1.46.0-wmf.23; 2026-04-07), Content-Transform-Team
cscott created T429391: Separate $isParsoidContent boolean from "has page bundle" in ContentHolder.
Tue, Jun 16, 6:31 PM · MW-1.47-notes (1.47.0-wmf.11; 2026-07-14), Patch-For-Review, Content-Transform-Team, MediaWiki-General
cscott renamed T428948: Backport ContentHolder serialization to MW 1.45 from Backport ContentHolder serialization to 1.45 to Backport ContentHolder serialization to MW 1.45.
Tue, Jun 16, 3:59 PM · Patch-For-Review, MW-1.45-release, Essential-Work
cscott closed T353570: Clean up old ParserCache serialization test cases as Resolved.
Tue, Jun 16, 3:56 PM · MW-1.45-notes (1.45.0-wmf.18; 2025-09-09), MW-1.44-notes, MediaWiki-Parser, User-Daniel, Documentation, Content-Transform-Team, Platform Team Workboards (MW Expedition)
cscott closed T353570: Clean up old ParserCache serialization test cases, a subtask of T325567: Document how to safely make changes to ParserOutput serialization, as Resolved.
Tue, Jun 16, 3:56 PM · MediaWiki-Parser, User-Daniel, Documentation, Content-Transform-Team, Platform Team Workboards (MW Expedition)
cscott closed T353570: Clean up old ParserCache serialization test cases, a subtask of T355952: "PHP Deprecated: Use of MediaWiki\Parser\ParserOutput::setTOCHTML was deprecated in MediaWiki 1.40" in PHPUnit tests, as Resolved.
Tue, Jun 16, 3:56 PM · MW-1.42-notes (1.42.0-wmf.20; 2024-02-27), Content-Transform-Team-WIP, ci-test-error (WMF-deployed Build Failure), MediaWiki-Parser, MediaWiki-Core-Tests
cscott closed T305158: Tighten up ParserOutput::setPageProperty() to only allow string values; add ::setIndexedPageProperty() for numeric values as Resolved.

This was (finally?) done in ef8dfcf26bdbc74a0e59ccd275b8dd88c039fee5.

Tue, Jun 16, 3:54 PM · MW-1.43-notes (1.43.0-wmf.2; 2024-04-23), MW-1.42-notes, MW-1.39-notes (1.39.0-wmf.7; 2022-04-11), MediaWiki-Parser
cscott closed T305158: Tighten up ParserOutput::setPageProperty() to only allow string values; add ::setIndexedPageProperty() for numeric values, a subtask of T357783: Allow page properties to independently specify value and sort key, as Resolved.
Tue, Jun 16, 3:54 PM · Patch-Needs-Improvement, MediaWiki-Page-derived-data

Mon, Jun 15

cscott added a comment to T427561: Remove outdated rel=noreferrer from target=_blank links created by $wgExternalLinkTarget.

It turns out that some folks do still require noreferrer? T429090: Add "noreferrer" to the "rel" attribute for links leading to archive.today or one of its mirrors

Mon, Jun 15, 3:48 PM · Essential-Work, MW-1.47-notes (1.47.0-wmf.9; 2026-06-30), Content-Transform-Team (Work In Progress), Patch-For-Review, Parsoid, Codex, MediaWiki-Parser
cscott added a comment to T429090: Add "noreferrer" to the "rel" attribute for links leading to archive.today or one of its mirrors.

This was done for T427561: Remove outdated rel=noreferrer from target=_blank links created by $wgExternalLinkTarget and WikimediaCustomizations would add rel=noreferrer back to legacy parses but not to Parsoid Read Views (almost all wikipedias).

Mon, Jun 15, 3:47 PM · Product Safety and Integrity (Sprint Rose (Jun 15 - Jun 26)), WikimediaCustomizations, MW-1.47-notes (1.47.0-wmf.6; 2026-06-09)
cscott moved T424399: shwiki uses unbalanced `-{` in Template:refbegin from Backlog to To Deploy on the Content-Transform-Team (Work In Progress) board.
Mon, Jun 15, 3:08 PM · OKR-Work, Content-Transform-Team (Work In Progress), Parsoid-Read-Views (Language Converter Support)

Thu, Jun 11

cscott updated the task description for T393925: Parsoid should generate the <head> on the core side, from the ParserOutput metadata.
Thu, Jun 11, 8:25 PM · MW-1.47-notes (1.47.0-wmf.9; 2026-06-30), Patch-For-Review, MW-1.43-notes (1.43.0-wmf.23; 2024-09-17), Parsoid-Read-Views (Phase 4 - Parsoid generates metadata needed by core), Parsoid
cscott updated the task description for T393925: Parsoid should generate the <head> on the core side, from the ParserOutput metadata.
Thu, Jun 11, 8:24 PM · MW-1.47-notes (1.47.0-wmf.9; 2026-06-30), Patch-For-Review, MW-1.43-notes (1.43.0-wmf.23; 2024-09-17), Parsoid-Read-Views (Phase 4 - Parsoid generates metadata needed by core), Parsoid
cscott added a comment to T428949: Backport ContentHolder serialization to MW 1.44.

Current status: SerializationTestTrait: introduce ::normalizeForObjectEquality (1300886) · Gerrit Code Review exists but has conflicts that need to be resolved; that's the prerequisite for both of the above patches.

Thu, Jun 11, 6:43 PM · MW-1.44-release, Essential-Work