Uploaded image for project: 'CMS'
  1. CMS
  2. CMS-10860

[ContentType] View from super type does not reference inherited attributes

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • 4.5.0
    • 4.4.0
    • None
    • None
    • 4.5 M3

      How to reproduce:

      • Create a content type extending articles
      • In the content type define the attribute abstract and change the label
      • Do not define the main or default-edition view
      • Create a content of this type
      • The label of the abstract attribute is the article's one, not the one you just created => KO

          [CMS-10860] [ContentType] View from super type does not reference inherited attributes

          Caroline Bayle added a comment -

          Lets have the following content types:

          • TypeA
            • attributeX (label = x)
            • viewX
              • attribute-ref -> attributeX
            • viewY
              • attribute-ref -> attributeX
            • viewZ
              • attribute-ref -> attributeX
          • TypeB extends TypeA
            • attributeX (label = xx)
            • viewX
              • attribute-ref -> attributeX
            • viewY
              • include from super type

          In views using the super type (Y and Z) reference the wrong model item instance :

          • TypeA.getModelItem("attributeX").getLabel() => x (OK)
          • TypeA.getView("viewX").getModelViewItem("attributeX").getLabel() => x (OK)
          • TypeA.getView("viewY").getModelViewItem("attributeX").getLabel() => x (OK)
          • TypeA.getView("viewZ").getModelViewItem("attributeX").getLabel() => x (OK)

           

          • TypeB.getModelItem("attributeX").getLabel() => xx (OK)
          • TypeB.getView("viewX").getModelViewItem("attributeX").getLabel() => xx (OK)
          • TypeB.getView("viewY").getModelViewItem("attributeX").getLabel() => x (KO)
          • TypeB.getView("viewZ").getModelViewItem("attributeX").getLabel() => x (KO)

          Caroline Bayle added a comment - Lets have the following content types: TypeA attributeX (label = x) viewX attribute-ref -> attributeX viewY attribute-ref -> attributeX viewZ attribute-ref -> attributeX TypeB extends TypeA attributeX (label = xx) viewX attribute-ref -> attributeX viewY include from super type In views using the super type (Y and Z) reference the wrong model item instance : TypeA.getModelItem("attributeX").getLabel() => x ( OK ) TypeA.getView("viewX").getModelViewItem("attributeX").getLabel() => x ( OK ) TypeA.getView("viewY").getModelViewItem("attributeX").getLabel() => x ( OK ) TypeA.getView("viewZ").getModelViewItem("attributeX").getLabel() => x ( OK )   TypeB.getModelItem("attributeX").getLabel() => xx ( OK ) TypeB.getView("viewX").getModelViewItem("attributeX").getLabel() => xx ( OK ) TypeB.getView("viewY").getModelViewItem("attributeX").getLabel() => x ( KO ) TypeB.getView("viewZ").getModelViewItem("attributeX").getLabel() => x ( KO )

            cbayle Caroline Bayle
            cbayle Caroline Bayle
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: