Page MenuHomePhabricator

Template insertion fails in 2017 wikitext editor (including citation templates via citoid)
Closed, ResolvedPublic

Description

Per arwiki user complaint that when he try to generate citation on new wikitext mode (2017 wikitext editor), it not generated at all.

Steps:

  • Enable New wikitext mode from beta features section.
  • Ctrl+Shift+K > Manual > Website (for example)
  • Fill it then click insert
  • Nothing generated

(This also fails using the autofill tool)

Additionally templates added from the template dialog are not being inserted either:

  • Insert
  • Template
  • Select template (i.e. See also)
  • Fill in field
  • Click insert
  • No error is logged in the console; a popup briefly flashes on the screen, then the dialog closes without any template being inserted.

Event Timeline

The API request to convert the citation to wikitext is failing with "code":"missingparam","info":"The \"page\" parameter must be set."

Maybe caused by https://gerrit.wikimedia.org/r/c/mediawiki/extensions/VisualEditor/+/587739?

In fact, we can’t add any template either (I think it is the same bug).

How so? Seems the same to me.

In fact, we can’t add any template either (I think it is the same bug).

Agreed, it can't seem to insert any template, looks like the same bug to me.

Mvolz renamed this task from Citation not generated in 2017 wikitext editor to Templates, including citation templates via citoid, fail to be inserted in 2017 wikitext editor.Jun 19 2020, 8:19 AM
Mvolz triaged this task as High priority.
Mvolz added a project: Citoid.
Mvolz added a subscriber: ppelberg.
Mvolz renamed this task from Templates, including citation templates via citoid, fail to be inserted in 2017 wikitext editor to Template insertion fails in 2017 wikitext editor (including citation templates via citoid).Jun 19 2020, 8:25 AM
Mvolz updated the task description. (Show Details)

The API request to convert the citation to wikitext is failing with "code":"missingparam","info":"The \"page\" parameter must be set."

Maybe caused by https://gerrit.wikimedia.org/r/c/mediawiki/extensions/VisualEditor/+/587739?

I've now tested this locally, reverting this edit fixes the problem.

Change 606680 had a related patch set uploaded (by Mvolz; owner: Mvolz):
[mediawiki/extensions/VisualEditor@master] Revert "Allow generic params to be passed to getWikitextFragment"

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

Change 606680 abandoned by Mvolz:
Revert "Allow generic params to be passed to getWikitextFragment"

Reason:
nvm i don't think it was this after all

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

Change 606680 restored by Mvolz:
Revert "Allow generic params to be passed to getWikitextFragment"

Reason:
nvm this does fix it ^-^

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

Deployment timing
This patch should be deployed during one of Monday, 22-June's backport windows. [1]


  1. https://wikitech.wikimedia.org/wiki/Deployments#Monday,_June_22

Change 606680 merged by jenkins-bot:
[mediawiki/extensions/VisualEditor@master] Revert "Allow generic params to be passed to getWikitextFragment"

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

So, that basically means that we won't be able to edit properly until next week?

So, that basically means that we won't be able to edit properly until next week?

Unfortunately, yes. Here is why this is so:

  1. Today, is a Foundation Holiday which means there is limited staff availability to deploy changes
  2. We could deploy an Emergency fix [i] which would require an engineer on our team to do so; however, I do not think this issues qualifies as an "emergency" for the following reasons:
    • While some edits are prevented from being made, I do not think edits themselves are being lost
    • The number of edits potentially affected is relatively low (~2% of edits are made using NWE [ii]).
    • I think we can assume the people using NWE who are affected by this issue are familiar enough with the other editing interfaces to have the knowledge and motivation to switch to them when they realize NWE does not allow them to do what they are trying to do

i. https://wikitech.wikimedia.org/wiki/Deployments/Emergencies

ii. Edits made with NWE
Screen Shot 2020-06-19 at 1.58.58 PM.png (1×1 px, 180 KB)
https://superset.wikimedia.org/r/244

[OT - Sorry] @ppelberg how do you get that awesome graph? The link asks for login...?

Hm, the thing is: the main reason why people use the NWE (in my experience) is exactly the functionality that is broken now. So switching back to the old editor does not solve anything in this regard (while switching to VE does, oddly enough). Right now I have to start off with VE, insert templates and references, then switch to NWE and copypaste everything in place. Very unfortunate, but I get that the number of users affected is indeed pretty low.

Thanks for the fix. I agree with @XanonymusX that this is probably one of the main reasons for using the new wikitext editor. But I can wait patiently :)

I got excited for a second a few minutes ago, thinking I could add references again, after 3, nearly 4 days of being unable to, as I successfully added a couple of references in visual mode. However then I realised I originally tried to add references in source mode to a table and an infobox, so I tried to insert a random link to an infobox to test it out, and it failed to insert.

Change 606995 had a related patch set uploaded (by Mvolz; owner: Mvolz):
[mediawiki/extensions/VisualEditor@wmf/1.35.0-wmf.37] Revert "Allow generic params to be passed to getWikitextFragment"

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

Change 606995 merged by jenkins-bot:
[mediawiki/extensions/VisualEditor@wmf/1.35.0-wmf.37] Revert "Allow generic params to be passed to getWikitextFragment"

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

Mentioned in SAL (#wikimedia-operations) [2020-06-22T11:50:07Z] <urbanecm@deploy1001> Synchronized php-1.35.0-wmf.37/extensions/VisualEditor/modules/: Backport: rEVED0a080664eb1f: Revert "Allow generic params to be passed to getWikitextFragment" (T255785) (duration: 00m 58s)

Mvolz claimed this task.
Mvolz removed a project: Patch-For-Review.

This should be fixed now.

Confirmed, it's fixed. Thank you!