Page MenuHomePhabricator

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

Description

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

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

Event Timeline

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 subscribed.

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

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.

nshahquinn-wmf changed the task status from Stalled to Open.EditedJul 21 2017, 12:35 AM
nshahquinn-wmf subscribed.

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 :)

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.

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 Medium 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:

image.png (458×1 px, 87 KB)

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

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

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

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