Page MenuHomePhabricator

Red links marked as uneditable in visual editor
Closed, ResolvedPublic

Description

Red links already existing in the article are marked as uneditable in visual editor. Likely caused by the recent red link changes in Parsoid.

Example: https://pl.wikipedia.org/w/index.php?title=JimJam&veaction=edit&section=6#Seriale_fabularne

image.png (2×3 px, 248 KB)

Event Timeline

Purge a page, open the visual editor and you'll see that it is now impossible to edit any red link. This task should be of high priority.

Same issue on the English Wikipedia e.g., https://en.wikipedia.org/wiki/Anna_Hruby :-(

But not on https://en.wikipedia.org/wiki/Donald_Rosenfeld (which doesn't have any tables)

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

[mediawiki/services/parsoid@master] Suppress redlinks

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

Test wiki created on Patch demo by IHurbainPalatin (WMF) using patch(es) linked to this task:
https://patchdemo.wmflabs.org/wikis/e258f7c8ba/w

Let's see... the difference in markup is:

Old<a rel="mw:WikiLink" href="./I_am" title="I am" class="new" data-parsoid='{"stx":"simple","a":{"href":"./I_am"},"sa":{"href":"I am"},"dsr":[0,8,2,2]}'>I am</a>
New<a rel="mw:WikiLink" href="./I_am?action=edit&amp;redlink=1" title="I am" class="new" typeof="mw:LocalizedAttrs" data-parsoid='{"stx":"simple","a":{"href":"./I_am"},"sa":{"href":"I am"},"dsr":[0,8,2,2]}' data-mw-i18n='{"title":{"lang":"x-page","key":"red-link-title","params":["I am"]}}'>I am</a>

So I'd assume that the typeof="ms:LocalizedAttrs" is the issue. VE doesn't know anything about it, and internal link nodes aren't allowed to have unknown types.

mw:LocalizedAttrs should be safe to edit for now. Ideally, any attribute marked as "this is a localized attribute" would be uneditable, but this is probably irrelevant for wikilink titles.

Note that https://www.mediawiki.org/wiki/Specs/HTML/2.6.0#Internationalization also defines mw:I18n as a new typeof - we probably will want to keep those uneditable.

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

[mediawiki/extensions/VisualEditor@master] Adjust to changes to redlink behavior from parsoid

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

DLynch added a project: Editing-team.

Just to note, this is a similar cause to T324028.

Change 864794 merged by jenkins-bot:

[mediawiki/extensions/VisualEditor@master] Adjust to changes to redlink behavior from parsoid

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

Change 864724 had a related patch set uploaded (by Bartosz Dziewoński; author: DLynch):

[mediawiki/extensions/VisualEditor@wmf/1.40.0-wmf.12] Adjust to changes to redlink behavior from parsoid

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

Change 864724 merged by jenkins-bot:

[mediawiki/extensions/VisualEditor@wmf/1.40.0-wmf.12] Adjust to changes to redlink behavior from parsoid

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

Mentioned in SAL (#wikimedia-operations) [2022-12-05T21:22:26Z] <samtar@deploy1002> Started scap: Backport for [[gerrit:864724|Adjust to changes to redlink behavior from parsoid (T324352)]]

Mentioned in SAL (#wikimedia-operations) [2022-12-05T21:24:07Z] <samtar@deploy1002> samtar and matmarex: Backport for [[gerrit:864724|Adjust to changes to redlink behavior from parsoid (T324352)]] synced to the testservers: mwdebug1001.eqiad.wmnet, mwdebug2002.codfw.wmnet, mwdebug2001.codfw.wmnet, mwdebug1002.eqiad.wmnet

Mentioned in SAL (#wikimedia-operations) [2022-12-05T21:31:32Z] <samtar@deploy1002> Finished scap: Backport for [[gerrit:864724|Adjust to changes to redlink behavior from parsoid (T324352)]] (duration: 09m 05s)

Change 864732 abandoned by Subramanya Sastry:

[mediawiki/services/parsoid@master] Suppress redlinks

Reason:

Not needed anymore. Can always restore it if required for any reason.

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

Change 868190 had a related patch set uploaded (by Bartosz Dziewoński; author: Bartosz Dziewoński):

[mediawiki/extensions/VisualEditor@master] Add more test cases for mw.libs.ve.get_targetDataFromHref

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

Change 868190 merged by jenkins-bot:

[mediawiki/extensions/VisualEditor@master] Add more test cases for mw.libs.ve.get_targetDataFromHref

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

Test wiki on Patch demo by IHurbainPalatin (WMF) using patch(es) linked to this task was deleted:

https://patchdemo.wmflabs.org/wikis/e258f7c8ba/w/

  NODES
HOME 1
Idea 1
idea 1
Intern 2
Note 9
os 11
server 1
visual 20