Page MenuHomePhabricator

TemplateData: Inheritance is not recursive
Closed, DeclinedPublic

Description

Was testing some inheritance, and when I've removed a label, it's still in the output:

<templatedata>
{

"description": "Testing inheritance",
"params": {
        "a": {
                "label": "A",
                "description": "aaa",
                "required": true,
                "inherits": "b"
        },
        "b": {
                "required": true,
                "inherits": "c"
        },
        "c": {
                "required": true,
                "inherits": "d"
        },
        "d": {
                "label": "D",
                "required": true,
                "inherits": "a"
        }
}

}
</templatedata>

results in http://i.imgur.com/WrknHsI.png

tested on http://en.wikipedia.org/wiki/Template:Main


Version: unspecified
Severity: normal

Details

Reference
bz50427

Event Timeline

bzimport raised the priority of this task from to High.Nov 22 2014, 1:50 AM
bzimport added a project: TemplateData.
bzimport set Reference to bz50427.
Krinkle lowered the priority of this task from High to Low.May 8 2015, 4:14 AM

Suggesting wontfix. Inheritance is intended to work only one level deep.

In the given example "a" is inheriting "b" without problems. It inherits the "required" property from "b". In this case a local property in "a" shadows it, but that should not cause an error.

We could implement an error raised when an author specifies inheritance from a parameter with no inheritable properties, but that wouldn't help in this case.

Krenair renamed this task from TemplateData: Error during inheritance test to TemplateData: Inheritance is not recursive.Jan 13 2016, 6:20 AM
Krenair set Security to None.
thiemowmde subscribed.

As said above this is an intentional limitation. Lifting it would make working with such data exponentially more complicated. It's really not worth it, especially considering that there is more than one tool that needs to understand this, e.g. ContentTranslation.