"Often used" not shown in VisualEditor (kowiki)
Closed, ResolvedPublic8 Story Points


"Often used" does not show up in VisualEditor even though the Mediawiki:Visualeditor-quick-access-characters.json has been created as below.

I created this task by following a request from Korean Wikipedia.

Ykhwong created this task.Mar 3 2017, 1:42 PM
Restricted Application added subscribers: revi, Aklapper. · View Herald TranscriptMar 3 2017, 1:42 PM
Jdforrester-WMF changed the task status from Open to Stalled.Apr 11 2017, 7:32 PM
Jdforrester-WMF moved this task from To Triage to TR1: Releases on the VisualEditor board.
Jdforrester-WMF added a subscriber: Jdforrester-WMF.

You can't do "encapsulate" actions in that message, I believe. If you remove them it should work.

Elitre added a subscriber: Elitre.Apr 12 2017, 3:05 PM

This issue was brought up over 2 months ago in Korean Wikipedia, and we are still waiting for the issue to be resolved in the near future.
Please understand that the "encapsulate" action is required in the VisualEditor because it has been frequently used in the source editor for a long time.

Thanks for your support.

Neil_P._Quinn_WMF changed the task status from Stalled to Open.EditedJul 21 2017, 12:35 AM

I confirmed with @Jdforrester-WMF that encapsulate actions should work, and so the fact that the characters aren't showing up on the Korean Wikipedia seems like a bug. I've asked whether an engineer on the VE team can take a look and see what the problem is.

Thanks for your patience, @Ykhwong :)

Elitre added a subscriber: Deskana.Jul 21 2017, 6:39 AM

Adding current PM.

Can someone explain this to me? Per the documentation page, these json pages are providing configuration for the special characters page. What does "encapsulate" do here? That word is not mentioned anywhere on the documentation page.

So encapsulate means that if you write down a word, and then click on the set of quotes that have been defined with "encapsulate", the quotes will be automatically added at the beginning and at the end of the word itself. Otherwise you'd have to click on 2 different buttons, one for the opening quotes and the other for the closing ones.

Deskana triaged this task as Normal priority.Jul 25 2017, 9:46 AM

Thanks @Elitre. Given the above, this should really be working, so some investigation in to why it's not working is doable.

Deskana raised the priority of this task from Normal to High.Aug 23 2017, 3:49 PM
Deskana added subscribers: DLynch, Esanders, dchan.

@Esanders @DLynch @dchan Can one of you do some investigation here? It'd be good to find out what the problem is.

I'm taking a look. It seems to be having a parse error on the JSON, though directly copying it locally causes nothing.

I'm calling this suspicious:

So, it seems that in 미디어위키:Visualeditor-quick-access-characters.json it's seeing "{{llang||}}" as a key... and expanding the template.

Also, this is exactly the same error as T167051. @Esanders?

This was probably introduced in 786c576893748cdebfce5a847a5298bf6202fe08. Following that code, the message is used with ->text(), which expands templates and parser functions (but doesn't parse wikitext). This is (somewhat poorly) documented at https://www.mediawiki.org/wiki/Manual:Messages_API: "{{-transformation is done".

Normal 'messages' entries in ResourceLoader modules use ->plain(), which does no parsing or expanding at all (see MessageBlobStore::fetchMessage()).

I'll note that 'visualeditor-quick-access-characters.json' is also used in the definition of the 'ext.visualEditor.mediawiki' module, so possibly (?) depending on load order, you might get the correct version of it (but it user language rather than content language). This should probably be removed.

Change 373331 had a related patch set uploaded (by Bartosz Dziewoński; owner: Bartosz Dziewoński):
[mediawiki/extensions/VisualEditor@master] VisualEditorDataModule: Do not expand templates in plain text messages


Jdforrester-WMF set the point value for this task to 8.

Change 373331 merged by jenkins-bot:
[mediawiki/extensions/VisualEditor@master] VisualEditorDataModule: Do not expand templates in plain text messages


Deskana closed this task as Resolved.Aug 24 2017, 1:09 AM


Restricted Application added a project: User-Ryasmeen. · View Herald TranscriptAug 24 2017, 1:09 AM