Page MenuHomePhabricator

After fixing subpage links in Parsoid read views, TOC links are broken
Closed, ResolvedPublic

Description

Parsoid usually sets a <base href> in the document, but when embedded page in an article this doesn't exist so our links are all broken.

See the [[Opportunities for the Content Transform Team]] link at https://en.wikipedia.org/wiki/User:Cscott/Ideas?useparsoid=1

EDIT: After adding the missing <base href>, all TOC links are broken; see comment below.

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald Transcript

I think we should fix this sooner than later .. I suspect officewiki has subpage links.

The solution to this might also fix T310520, if we're implementing a parsoid-read-views-specific href rewriting postprocessing pass.

Things to be careful of:

  • Don't break VE or other Parsoid clients who probably rely on href="./ in edit-mode HTML
  • Don't break links in the skin (ie, can we "just" change the <base href> on the page like parsoid does, or will that break other stuff surrounding the article?)

Change 973361 had a related patch set uploaded (by Isabelle Hurbain-Palatin; author: C. Scott Ananian):

[mediawiki/core@master] Fix Parsoid <base href>

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

Change 973361 merged by jenkins-bot:

[mediawiki/core@master] Fix Parsoid <base href>

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

cscott renamed this task from Parsoid read views don't handle subpage links to After fixing subpage links in Parsoid read views, TOC links are broken.Nov 15 2023, 3:54 PM
cscott updated the task description. (Show Details)
MSantos triaged this task as High priority.Nov 16 2023, 3:20 PM
MSantos moved this task from Needs Triage to Bugs & Crashers on the Parsoid board.

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

[mediawiki/core@master] [parsoid] Fix Parsoid relative links

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

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

[mediawiki/core@master] [parsoid] Fix Parsoid relative links, take 2

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

Change 975051 merged by jenkins-bot:

[mediawiki/core@master] [parsoid] Fix Parsoid relative links

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

MSantos moved this task from Backlog to Code Review on the Content-Transform-Team-WIP board.
MSantos moved this task from Code Review to To Deploy on the Content-Transform-Team-WIP board.
MSantos moved this task from To Deploy to Code Review on the Content-Transform-Team-WIP board.

Change 975081 abandoned by C. Scott Ananian:

[mediawiki/core@master] [parsoid] Fix Parsoid relative links, take 2

Reason:

Abandoned in favor of I60165a9946a35cfb42a78ed2f833c34570fefffc

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

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

[mediawiki/core@wmf/1.42.0-wmf.5] [parsoid] Fix Parsoid relative links

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

Change 975596 merged by jenkins-bot:

[mediawiki/core@wmf/1.42.0-wmf.5] [parsoid] Fix Parsoid relative links

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

Mentioned in SAL (#wikimedia-operations) [2023-11-20T22:27:22Z] <catrope@deploy2002> Started scap: Backport for [[gerrit:975596|[parsoid] Fix Parsoid relative links (T350952)]]

Mentioned in SAL (#wikimedia-operations) [2023-11-20T22:28:40Z] <catrope@deploy2002> catrope and cscott: Backport for [[gerrit:975596|[parsoid] Fix Parsoid relative links (T350952)]] synced to the testservers (https://wikitech.wikimedia.org/wiki/Mwdebug)

Mentioned in SAL (#wikimedia-operations) [2023-11-20T22:46:54Z] <catrope@deploy2002> Finished scap: Backport for [[gerrit:975596|[parsoid] Fix Parsoid relative links (T350952)]] (duration: 19m 32s)

Merged and backported to production; you might need ?action=purge on Parsoid Read Views pages for a while to get the sidebar links correct, since we need to regenerate the page without the <base href> in the ParserOutput::addHeadItems.