Page MenuHomePhabricator

Visual editor and 2017 wikitext editor mishandle cascading protection
Closed, ResolvedPublic

Description

When trying to edit a page transcluded in a cascade-protected page in the visual editor, instead of showing the typical "you can't do this" error, it lets you edit the page, showing the message that admins see when editing that page in the "Warnings" section.

The actual "you can't edit this" error messages doesn't occur until you try to publish your changes.

See Template:Citationneeded for an example.

Event Timeline

This comment was removed by Pppery.

The example I provided doesn't work anymore, because the page was protected, but the bug still exists

Note that there is an error message:

image.png (980×1 px, 112 KB)

But in spite of that, the editor acts as if the page was editable (until you try to save changes). It should probably use the read-only mode we use for protected pages.

Change 511047 had a related patch set uploaded (by Bartosz Dziewoński; owner: Bartosz Dziewoński):
[mediawiki/extensions/VisualEditor@master] Check if page is really editable and call #setReadOnly accordingly

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

Change 511047 merged by jenkins-bot:
[mediawiki/extensions/VisualEditor@master] Check if page is really editable and call #setReadOnly accordingly

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

ppelberg claimed this task.