Page MenuHomePhabricator

[WikiFunctions FE] Redundant set of empty English argument labels sent to API when creating new ZObject
Closed, ResolvedPublicBUG REPORT

Description

Steps to replicate the issue (include links if applicable):

  • Go to Special:CreateZObject?view=function-editor
  • Change the natural language to something non-English
  • Define function
  • Publish

What happens?:
The zobject sent to API contains empty English label for every argument, e.g.:

"Z17K3": {
    "Z1K1": "Z12",
    "Z12K1": [
        "Z11",
        {
            "Z1K1": "Z11",
            "Z11K1": "Z1002", // english
            "Z11K2": ""
        },
        {
            "Z1K1": "Z11",
            "Z11K1": "Z1006", // chinese
            "Z11K2": "chinese argument name"
        }
    ]
}

What should have happened instead?:
No English labels should be contained in a zobject if english not selected.

Software version (skip for WMF-hosted wikis like Wikipedia):
As of commit 4628c786ca339decffa7aa08f9e9c6070d37b6cc.

Event Timeline

EWright renamed this task from [WikiFunctions FE} Redundant set of empty English argument labels sent to API when creating new ZObject to [WikiFunctions FE] Redundant set of empty English argument labels sent to API when creating new ZObject.Sep 15 2022, 2:56 PM
EWright created this task.

Change 832352 had a related patch set uploaded (by Dani DW; author: Dani DW):

[mediawiki/extensions/WikiLambda@master] Function editor: argument labels are cleared from the zObject when the language selection changes.

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

Change 832352 merged by jenkins-bot:

[mediawiki/extensions/WikiLambda@master] Function editor: argument labels are cleared from the zObject when the language selection changes.

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

Hi Dani, looks like the above patch fixed the issue for the first argument label, but not subsequent labels.

Change 835669 had a related patch set uploaded (by Dani DW; author: Dani DW):

[mediawiki/extensions/WikiLambda@master] Prevent a redundant set of empty English argument labels being sent to API when creating new ZObject.

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

Change 835669 merged by jenkins-bot:

[mediawiki/extensions/WikiLambda@master] Prevent a redundant set of empty English argument labels being sent to API when creating new ZObject.

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