Uploaded image for project: 'PUBLIC - Liferay Portal Community Edition'
  1. PUBLIC - Liferay Portal Community Edition
  2. LPS-57163

Don't throw exception too early when verifying DDMStructures



      A SF commit here 5f2198: removed the ability to print out all the DDMStructures that fail validation, and instead throws an exception on the first one encountered. This provides a bad User Experience as they would only be notified of one structure failing each time they roll back the database and test. This fix is only for 62x because LPS-52278 was never merged into master - since the DDMStructures are different (Using XML vs JSON). See comment from LPS-52278 here.

      Original Issue as noted on LPS-52278.
      After upgrading from 6.1 to 6.2 SP6+, there are issues with structures that have a hierarchy where the children elements have the same names as the parent elements or other children elements. (There was a bug in 6.1 that allowed children elements to have the same names as parent and other child elements. This should not have been possible to do)
      -When editing a web content that uses one of these structures, the edit fields are missing/out of order.
      -These structures cannot be edited (such as adding another field) due to the error "Please enter unique metadata field names (including field names inherited from the parent)."
      -Renaming the fields to be unique so that the previous error is not encountered will either cause a loss of data in the web content that references the fields, or will leave the original field in the content and add a new field. (This could be part of a workaround as you can just copy the content from the original field to the new field, and then reference the new field in the template and the original will be ignored)

      Steps to Reproduce

      1. In 6.1, create a structure, template, and web content where the structure has duplicate field names. For example:
        Mother (text type)
        -Age (text type)
        Father (text type)
        -Age (text type)
      2. Create another structure with a new name, and duplicate field names. For example:
        Mother (text type)
        -Birthday (text type)
        Father (text type)
        -Birthday (text type)
      3. Upgrade to 6.2.x.

      Expected Result
      Console would print all failing structures, not just one. Then halt the upgrade.

      Actual Result
      When the first structure fails validation, the upgrade halts.

      Reproduced: 6.2.x dc7e6a4bb4bd1300d6a71d5c3dd859d5fe57dc29


        Issue Links



              mark.jin Mark Jin (Inactive)
              steven.smith Steven Smith (Inactive)
              Kiyoshi Lee Kiyoshi Lee
              0 Vote for this issue
              1 Start watching this issue


                7 years, 19 weeks, 3 days ago


                  Version Package
                  6.2.4 CE GA5
                  6.2.X EE