Page MenuHomePhabricator

Label for "Edit tab" displays raw wikitext when activating VE
Closed, ResolvedPublic

Description

Steps:

  1. https://en.wikipedia.org/wiki/File:British_shooting_logo.jpg
  2. Click "Add local description".

Screenshot 2022-04-25 at 16.44.43.png (300×1 px, 34 KB)

Actual:

Label for "Edit tab" unexpectedly displays raw wikitext.

Screenshot 2022-04-25 at 16.44.44.png (878×1 px, 84 KB)

Screenshot 2022-04-25 at 16.44.47.png (341×1 px, 66 KB)

Other notes:

Probably specfic to User/File namespace.

Probably not fixable, in so far that it's working as expected with this kind of parser syntax not allowed in these cross-platform interface messages. Perhaps we need to make sure the message is documented as being limited to the safe subset of message syntax (if not already) and fix, or help community to fix, their local override to comply.

Might be a recent regression, in which case perhaps it worked in a different way before, maybe VE had its own version of this message.

Event Timeline

I can't reproduce this. The tab does't change for me:

image.png (241×611 px, 21 KB)

@Esanders Please don't have me deported for saying this, but one has to use "English" to reproduce this bug ;-)

https://en.wikipedia.org/wiki/File:British_shooting_logo.jpg?uselang=en&action=edit

(The override, and bug, do not apply to the en-gb setting. I recently switched my global preference to en.)

I did actually test "International English" and couldn't reproduce, but I'll try again...

I still can't reproduce with your link, or by changing my preference.

I'm not sure what could make it vary for us. It happens in safemode as well:

  1. Production en.wikipedia.org, logged-in (due to required permission).
  2. https://en.wikipedia.org/wiki/File:British_shooting_logo.jpg?uselang=en&veaction=edit&safemode=on
  3. Consistently results in:

Screenshot 2022-05-11 at 16.08.03.png (544×2 px, 171 KB)

If the viewport is narrow, the label will go into the "More" menu.

The message, when using qqx, is revealed to be create-local, which is overriden at https://en.wikipedia.org/w/index.php?title=MediaWiki:Create-local&action=edit to be {{#ifeq:{{NAMESPACENUMBER}}|2|Create local userpage|Add local description}}. Unless this is rendered server-side by VE's API module, it seems expected that this shows up as plain text. I'm not sure how it could show any different.

matmarex subscribed.

To reproduce, you need to have "Editing mode" set to "Remember my last editor" in preferences.

We've recently made changes to ignore some other localisation messages that we can't parse client-side, in T317600. Maybe we could do the same here, and just skip updating the tab text when switching between visual and source mode if it can't be parsed.

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

[mediawiki/extensions/VisualEditor@master] DesktopArticleTarget.init: Remove code for updating edit links

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

Change 963423 merged by jenkins-bot:

[mediawiki/extensions/VisualEditor@master] DesktopArticleTarget.init: Remove code for updating edit links

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

EAkinloose subscribed.

✅ Label for "Edit tab" does not display raw wikitext when activating VE

Screenshot 2023-10-11 at 23.58.46.png (1×2 px, 271 KB)

matmarex moved this task from Ready for Sign Off to Doing on the Editing-team (Kanban Board) board.

Sadly I can still reproduce in production (the message is overridden there: https://en.wikipedia.org/w/index.php?title=MediaWiki:Create-local&action=edit).

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

[mediawiki/extensions/VisualEditor@master] Don't try to update tab text if a custom message is incompatible

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

Change 965558 merged by jenkins-bot:

[mediawiki/extensions/VisualEditor@master] Don't try to update tab text if a custom message is incompatible

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

matmarex added a project: Editing QA.

You should see a warning in the browser console after this change: "VisualEditor: MediaWiki:skin-view-create-local contains unsupported syntax. …"

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

[mediawiki/extensions/VisualEditor@REL1_39] DesktopArticleTarget.init: Remove code for updating edit links

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

Change 995231 merged by jenkins-bot:

[mediawiki/extensions/VisualEditor@REL1_39] DesktopArticleTarget.init: Remove code for updating edit links

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