Page MenuHomePhabricator

Charts are not compatible with Parsoid - show as raw SVG
Closed, ResolvedPublicBUG REPORT

Description

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

Also an issue in VE:

What happens?:

image.png (679×1 px, 290 KB)

I'm seeing the inlined SVG.

What should have happened instead?:

The chart should render and be easy to edit.

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

Other information (browser name/version, screenshots, etc.):

Related Objects

Event Timeline

There are a very large number of changes, so older changes are hidden. Show Older Changes
Jdlrobson renamed this task from Editing a chart with VE shows raw SVG to Charts show as raw SVG in Parsoid HTML.Sep 26 2024, 7:13 PM
Jdlrobson updated the task description. (Show Details)

I (for one) strongly prefer the parser function syntax. We'll make this work.

I don't think it's a matter of the sanitizer in Parsoid diverging from core, I think it's more likely a matter of how the sanitizer in Parsoid applies even to certain types of generated HTML, whereas in core that content is protected via strip state and never gets sanitized. Needs some investigation.

If it's expected that the Parsoid-HTML rendering of the chart is going to get fixed, it'll be pretty easy to write whatever you need for purely the editing side of this for VE.

This is a dup of T279094: Support for parser functions using "isHTML"?, and could probably be worked around by implementing a Parsoid-specific hook, but I do plan on working on T279094 in the near future for https://gerrit.wikimedia.org/r/c/mediawiki/core/+/1071016

There's some synergy with wikifunctions here, who are likely going to prototype a new parser function API/DOM representation for us (T373253) in Q2; we might want to have Charts hop on that same bandwagon.

This is a dup of T279094: Support for parser functions using "isHTML"?, and could probably be worked around by implementing a Parsoid-specific hook, but I do plan on working on T279094 in the near future for https://gerrit.wikimedia.org/r/c/mediawiki/core/+/1071016

Is this something you'll be picking up soon-ish? We're aiming to deploy charts to production in the coming months and would want to implement a workaround if the parser fix isn't going to be resolved for a while.

CCiufo-WMF edited projects, added Charts; removed Charts (Sprint 7).
Jdlrobson renamed this task from Charts show as raw SVG in Parsoid HTML to Charts are not compatible with Parsoid - show as raw SVG.Nov 5 2024, 6:15 PM

@CCiufo-WMF thinking ahead to the pilot wiki release - is this a blocker? In current state any editor who has opted into Parsoid or is editing via VisualEditor will not be able to render charts. One consideration here is that I suspect many of the technical editors we want feedback from might be opted into that state.

@CCiufo-WMF thinking ahead to the pilot wiki release - is this a blocker? In current state any editor who has opted into Parsoid or is editing via VisualEditor will not be able to render charts. One consideration here is that I suspect many of the technical editors we want feedback from might be opted into that state.

Yes I'd consider this a blocker...has there been any progress on addressing it?

Chatted to @Dbrant and this is actually breaking the apps display of charts in read mode.

Change #1088365 had a related patch set uploaded (by C. Scott Ananian; author: C. Scott Ananian):

[mediawiki/core@master] Parsoid DataAccess: support strip state in parser function results

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

aude removed aude as the assignee of this task.Nov 7 2024, 9:08 PM
aude subscribed.

https://gerrit.wikimedia.org/r/1088365 should resolve this bug when it lands and rides the train.

CCiufo-WMF removed the point value 2 for this task.Nov 15 2024, 5:29 PM

Change #1088365 merged by jenkins-bot:

[mediawiki/core@master] Parsoid DataAccess: support strip state in parser function results

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

Change #1092341 had a related patch set uploaded (by C. Scott Ananian; author: C. Scott Ananian):

[operations/mediawiki-config@master] Enable experimental Parsoid fragment support on labs and test wikis

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

Change #1092341 merged by jenkins-bot:

[operations/mediawiki-config@master] Enable experimental Parsoid fragment support on labs and test wikis

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

Mentioned in SAL (#wikimedia-operations) [2024-11-19T21:39:39Z] <urbanecm@deploy2002> Started scap sync-world: Backport for [[gerrit:1092341|Enable experimental Parsoid fragment support on labs and test wikis (T374661)]], [[gerrit:1092850|Revert "editcheck: Remove try/catch around transaction squashing" (T333710 T380234)]], [[gerrit:1092851|Revert "editcheck: Remove try/catch around transaction squashing" (T333710 T380234)]]

Mentioned in SAL (#wikimedia-operations) [2024-11-19T21:45:09Z] <urbanecm@deploy2002> cscott, kemayo, urbanecm: Backport for [[gerrit:1092341|Enable experimental Parsoid fragment support on labs and test wikis (T374661)]], [[gerrit:1092850|Revert "editcheck: Remove try/catch around transaction squashing" (T333710 T380234)]], [[gerrit:1092851|Revert "editcheck: Remove try/catch around transaction squashing" (T333710 T380234)]] synced to the testservers (https://wikitech.wikimedia.or

Mentioned in SAL (#wikimedia-operations) [2024-11-19T22:00:19Z] <urbanecm@deploy2002> Finished scap sync-world: Backport for [[gerrit:1092341|Enable experimental Parsoid fragment support on labs and test wikis (T374661)]], [[gerrit:1092850|Revert "editcheck: Remove try/catch around transaction squashing" (T333710 T380234)]], [[gerrit:1092851|Revert "editcheck: Remove try/catch around transaction squashing" (T333710 T380234)]] (duration: 20m 39s)

Change #1093398 had a related patch set uploaded (by C. Scott Ananian; author: C. Scott Ananian):

[mediawiki/services/parsoid@master] Turn on Parsoid Fragment Support for RT testing

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

Change #1093399 had a related patch set uploaded (by C. Scott Ananian; author: C. Scott Ananian):

[operations/mediawiki-config@master] Turn on Parsoid fragment support everywhere

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

Change #1093398 merged by jenkins-bot:

[mediawiki/services/parsoid@master] Turn on Parsoid Fragment Support for RT testing

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

We just need to verify that the changes we made for supporting this will stick -- we are running rt tests with this core change enabled, and we will deploy, and once that sticks, we can close this.

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

[mediawiki/vendor@master] Bump wikimedia/parsoid to 0.21.0-a8

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

Change #1097374 merged by jenkins-bot:

[mediawiki/vendor@master] Bump wikimedia/parsoid to 0.21.0-a8

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

Turning fragment support on more broadly on production wikis is currently blocked on T380758.

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

[mediawiki/services/parsoid@master] Turn on Parsoid Fragment Support v2 for RT testing

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

Change #1105740 merged by jenkins-bot:

[mediawiki/services/parsoid@master] Turn on Parsoid Fragment Support v2 for RT testing

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

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

[mediawiki/vendor@master] Bump wikimedia/parsoid to 0.21.0-a11

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

Change #1110838 merged by jenkins-bot:

[mediawiki/vendor@master] Bump wikimedia/parsoid to 0.21.0-a11

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

Change #1118138 had a related patch set uploaded (by C. Scott Ananian; author: C. Scott Ananian):

[mediawiki/services/parsoid@master] Turn on Parsoid Fragment Support v2 for RT testing

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

Change #1118138 merged by jenkins-bot:

[mediawiki/services/parsoid@master] Turn on Parsoid Fragment Support v2 for RT testing

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

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

[mediawiki/vendor@master] Bump wikimedia/parsoid to 0.21.0-a15

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

Change #1118559 merged by jenkins-bot:

[mediawiki/vendor@master] Bump wikimedia/parsoid to 0.21.0-a15

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

Change #1093399 merged by jenkins-bot:

[operations/mediawiki-config@master] Turn on Parsoid fragment support everywhere

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

Mentioned in SAL (#wikimedia-operations) [2025-02-27T21:26:59Z] <ladsgroup@deploy2002> Started scap sync-world: Backport for [[gerrit:1093399|Turn on Parsoid fragment support everywhere (T374661 T386233)]]

Mentioned in SAL (#wikimedia-operations) [2025-02-27T21:34:37Z] <ladsgroup@deploy2002> cscott, ladsgroup: Backport for [[gerrit:1093399|Turn on Parsoid fragment support everywhere (T374661 T386233)]] synced to the testservers (https://wikitech.wikimedia.org/wiki/Mwdebug)

Mentioned in SAL (#wikimedia-operations) [2025-02-27T21:50:25Z] <ladsgroup@deploy2002> Finished scap sync-world: Backport for [[gerrit:1093399|Turn on Parsoid fragment support everywhere (T374661 T386233)]] (duration: 23m 25s)

Change #1130343 had a related patch set uploaded (by C. Scott Ananian; author: C. Scott Ananian):

[operations/mediawiki-config@master] Turn on Parsoid fragment support everywhere (take 2)

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

Change #1130343 merged by jenkins-bot:

[operations/mediawiki-config@master] Turn on Parsoid fragment support everywhere (take 2)

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

Mentioned in SAL (#wikimedia-operations) [2025-03-24T13:33:27Z] <tgr@deploy1003> Started scap sync-world: Backport for [[gerrit:1130343|Turn on Parsoid fragment support everywhere (take 2) (T374661 T380758 T389545 T387608)]], [[gerrit:1130560|Do not throw an exception after shared-domain login with no token (T362715)]], [[gerrit:1130561|Do not start central login from the shared domain (T362715)]]

Mentioned in SAL (#wikimedia-operations) [2025-03-24T13:37:04Z] <tgr@deploy1003> tgr, cscott: Backport for [[gerrit:1130343|Turn on Parsoid fragment support everywhere (take 2) (T374661 T380758 T389545 T387608)]], [[gerrit:1130560|Do not throw an exception after shared-domain login with no token (T362715)]], [[gerrit:1130561|Do not start central login from the shared domain (T362715)]] synced to the testservers (https://wikitech.wikimedia.org/wiki/Mwdebug)

Mentioned in SAL (#wikimedia-operations) [2025-03-24T13:54:09Z] <tgr@deploy1003> Finished scap sync-world: Backport for [[gerrit:1130343|Turn on Parsoid fragment support everywhere (take 2) (T374661 T380758 T389545 T387608)]], [[gerrit:1130560|Do not throw an exception after shared-domain login with no token (T362715)]], [[gerrit:1130561|Do not start central login from the shared domain (T362715)]] (duration: 20m 42s)

Fragments are enabled everywhere in production now.