Uploaded image for project: 'Migration 4.4 to 4.5 (closed)'
  1. Migration 4.4 to 4.5 (closed)
  2. MGNLMIGRATION-221

Migrate Content: Change from jcr:primaryType "mgnl.contentNode" to "mgnl:component"

    XMLWordPrintable

Details

    Description

      After migrating Website Content to 4.5.7, I've to change the old paragraphs jcr:primaryTpye from "mgnl.contentNode" to "mgnl:component"

      <sv:node sv:name="0"> <- this is a paragraph
      <sv:property sv:name="jcr:primaryType" sv:type="Name">
      <sv:value>mgnl:contentNode</sv:value>
      </sv:property>

      So I wrote a little script which finds me all paragraphs. When trying

      node.setProperty("jcr:primaryType", "mgnl:component");

      it always results in a "javax.jcr.nodetype.ConstraintViolationException: Unable to perform operation. Node is protected."

      same with
      MigrationUtil.updatePropertyIfExist(node, propertyName, oldValue, newValue)

      For a proper migration it is necessary to update those nodes types.

      How to perform this action with the Magnolia Migration Tool.

      Checklists

        Acceptance criteria

        Attachments

          Activity

            People

              Unassigned Unassigned
              tomwespi Tom Wespi
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Checklists

                  Task DoR