Page MenuHomePhabricator

VisualEditor: Provide support for BLP edit notices on enwiki
Closed, ResolvedPublic40 Estimated Story Points

Description

For BLP's and disambiguation pages on the English Wikipedia, an extra edit notice is provided through the https://en.wikipedia.org/wiki/Wikipedia:EDITINTRO system using Extension:InputBox and some code in MediaWiki:Common.js. VisualEditor does not work with Extension:InputBox, so the edit notice is not displayed.

This hack is being used in several Wikimedia wikis besides the English Wikipedia:

See also Template:BLP editintro (Q10566946) and Template:Disambig editintro (Q14400704) for more of the potentially affected wikis.


Version: unspecified
Severity: normal

Event Timeline

bzimport raised the priority of this task from to Lowest.Nov 22 2014, 2:09 AM
bzimport set Reference to bz54029.

To work as desired VE would need to respect the editintro= url parameter. For example
http://en.wikipedia.org/wiki/Paul_Bahn?veaction=edit&editintro=Template:BLP_editintro
and use that to fill in the edit notice with Template:BLP_editintro.
A couple of lines in MediaWiki:Common.js would add the parameters to URL's for all BLPs.

alternatively, get away from this specific implementation and try to move it into core as "category based edit notices" and VE gets the notice for free.

alternatively, get away from this specific implementation and try to move it into core as "category based edit notices" and VE gets the notice for free.

I've created a specific task for per category editnotices, T85372, I had already suggested it for the more general T20596 but this didn't get implemented.
FYI, the English Wikipedia isn't the only wiki to use this.
Adding support in VE for preload / editintro is still worthy on its own, but it looks like this task is a duplicate of T51622.

I've uploaded a patch for this (per-category editnotices) : commit 189178.

I've uploaded a patch for this (per-category editnotices) : commit 189178.

I've updated the patch, it works properly now.

Quiddity subscribed.

Adding support in VE for preload / editintro is still worthy on its own, but it looks like this task is a duplicate of T51622.

Now Merging.

Jdforrester-WMF raised the priority of this task from Lowest to Medium.
Jdforrester-WMF updated the task description. (Show Details)

One way to fix this, as @Cenarium has observed, would be to fix T85372: Add support for per-category editnotices and switch wiki(?s) over to use that instead; is this the best option?

I think it is better than editintro+JS yes.

TheDJ renamed this task from VisualEditor: Magically support Extension:InputBox's content for BLP warning notices on enwiki to VisualEditor: Provide support for BLP edit notices on enwiki.Jun 22 2015, 7:20 PM

Change 329796 had a related patch set uploaded (by Esanders):
Add editintro to notices

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

Change 329796 merged by jenkins-bot:
Add editintro to notices

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

Just to make you know: in ruwiki, we adapted RockMFR's "magic editintros" to work with VisualEditor (although the resultant script is rather hackish), see https://ru.wikipedia.org/wiki/MediaWiki:Gadget-blpEditNotice.js.

This already almost works. The API used by VE to fetch edit notices supports the 'editintro' parameter. In fact, if you follow this link, you'll see the notice: https://en.wikipedia.org/w/index.php?title=Jasmin_Fejzić&veaction=edit&editintro=Template:BLP_editintro. But if you just click "Edit" on the same page, you won't. This probably only needs a tiny bit of glue code to parse the parameters from the "Edit" link, like we're already parsing them from the URL.

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

[mediawiki/extensions/VisualEditor@master] DesktopArticleTarget.init: Support '&editintro=…' in edit links

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

Change 923769 merged by jenkins-bot:

[mediawiki/extensions/VisualEditor@master] DesktopArticleTarget.init: Support '&editintro=…' in edit links

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

matmarex moved this task from Code Review to QA on the Editing-team (Kanban Board) board.

This should make the edit intros work.

There's one known issue: the edit intro message only appears the first time the editor is opened after loading/refreshing the page. (Afterwards editor initialization is done differently, and adding this feature without messing up the browser back/forward navigation proved difficult.) We should probably file a separate task about this.

It seems the edit intro message is appearing only when you load the page following the link that has the 'editintro' url parameter. But, it's still not showing the edit notice when you click on the 'Edit' button directly on the same page which I think what the new patch was for?

Change 923769 merged by jenkins-bot:

[mediawiki/extensions/VisualEditor@master] DesktopArticleTarget.init: Support '&editintro=…' in edit links

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

Here is the screen capture of the issue. Also, it seems the URL on the address bar is different from what it shows when you hover over the Edit link:

This is different from the special case @matmarex mentioned here:

This should make the edit intros work.

There's one known issue: the edit intro message only appears the first time the editor is opened after loading/refreshing the page. (Afterwards editor initialization is done differently, and adding this feature without messing up the browser back/forward navigation proved difficult.) We should probably file a separate task about this.

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

[mediawiki/extensions/VisualEditor@master] Fix '&editintro=…' not working on Vector with some settings

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

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

[mediawiki/extensions/VisualEditor@master] Support '&editintro=…' etc. on back/forward and VE/NWE switch

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

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

[mediawiki/extensions/VisualEditor@master] Support '&editintro=…' etc. on subsequent loads via page tabs

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

Thank you @Ryasmeen, I figured out why that was happening. It was only broken when using single edit tab mode, and I didn't think to test that before.

I also fixed the other issue, so after these changes, the message should appear after the editor is opened again as well.

Change 931571 merged by jenkins-bot:

[mediawiki/extensions/VisualEditor@master] Fix '&editintro=…' not working on Vector with some settings

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

Change 931572 merged by jenkins-bot:

[mediawiki/extensions/VisualEditor@master] Support '&editintro=…' etc. on back/forward and VE/NWE switch

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

Change 931573 merged by jenkins-bot:

[mediawiki/extensions/VisualEditor@master] Support '&editintro=…' etc. on subsequent loads via page tabs

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