Uploaded image for project: '[Read Only] - Hippo Repository'
  1. [Read Only] - Hippo Repository
  2. REPO-1670

CND export (from Console) can be incorrect or even invalid for special cases

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Normal
    • Resolution: Fixed
    • None
    • 5.0.0
    • None
    • None
    • Platform Sprint 156: Export

    Description

      Related to (or better: discovered while fixing) REPO-1669, it turned out that the implementation of the CND export feature in the Console has some quirks under special conditions.

      For example, for the nodetype hipposys:applicationfolder it adds the attribute 'orderable', while that actually isn't defined on the hipposys.cnd source itself (anymore).

      More critical, if using one of the delimiter characters, like '-' within an named (not * residual) node or property name without a namespace prefix (see REPO-1669) then it fails to write the item name within quotes (single or double), nor does it encode the delimiter itself. The resulting cnd file then is invalid and will fail to load therafter, or create the wrong nodetype definition...
      That is a rather unusual usage, to practically not really problematic, but a bug nonetheless.

      After further diving into this, I realized we use our own custom JcrCompactNodeTypeDefWriter, which was forked/improved long time back from an earlier implemention in JR 1.x.

      Since then, JR 2.x has improved and fixed its own CompactNodeTypeDefWriter, and further aligned it with the now JCR 2.0 spec based CND grammar.

      After testing with the 'standard' JR implementation, it turned out to have none of the above problems/bugs anymore and also generates output which is cleaner and more aligned with the spec based CND grammer too.

      So the fix is rather easy: just drop our own (writer) implementation and delegate back to the CompactNodeTypeDefWriter from JR itself. 

       

       

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              adouma Ate Douma (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: