Page MenuHomePhabricator

New created types are saved in a broken state when their isIdentity key for each key is left empty
Closed, ResolvedPublicBUG REPORT

Description

Description

Creation of new types succeeds when their keys are left unset (not marking false nor true).
However, the ZObject is not valid and this causes its Deferred Updates to fail, which means that the labels are not stored in the secondary table, and hence the type is not searchable.

What's causing the issue:

Keys are initialized in the front-end so that users can fill their values.
Before submission, some transformations are applied, but Z3K4 is left as an empty reference (which is non-valid):

{
    "Z1K1": "Z3",
    "Z3K1": "Z6",
    "Z3K2": "Z22820K1",
    "Z3K3": {
        "Z1K1": "Z12",
        "Z12K1": [
            "Z11"
        ]
    },
    "Z3K4": {
        "Z1K1": "Z40",
        "Z40K1": ""
    }
}

What to do:

Include boolean key Z3K4 resetting in the transformations:

  • if valid boolean literal: leave untouched
  • if valid boolean reference: leave untouched
  • if empty boolean literal: set to false boolean literal
  • if empty boolean reference: set to false boolean reference

Completion checklist

Event Timeline

Change #1131659 had a related patch set uploaded (by Genoveva Galarza; author: Genoveva Galarza):

[mediawiki/extensions/WikiLambda@master] Add transformation to avoid saving empty booleans in Z3K4s

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

Change #1131659 merged by jenkins-bot:

[mediawiki/extensions/WikiLambda@master] Add transformation to avoid saving empty booleans in Z3K4s

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

DSantamaria changed the task status from Open to In Progress.Mar 31 2025, 11:18 AM