Uploaded image for project: 'Magnolia UI'
  1. Magnolia UI
  2. MGNLUI-6774

DOC: Link field changed formats in 6.2.4

    XMLWordPrintable

Details

    • Improvement
    • Resolution: Obsolete
    • Major
    • None
    • 6.2.4
    • None
    • None

    Description

      Link field through version 6.2.3 defaults to ID. Starting in 6.2.4 it's back to path.

      Old UI:

      • linkField linked by default via path
      • had to use a special class to link via UUID
      identifierToPathConverter:  
        class: info.magnolia.ui.form.field.converter.BaseIdentifierToPathConverter
      

      New UI -> to Update

      Link field through version 6.2.3 defaults to ID. Starting in 6.2.4 it's back to path (like the old UI).

      This page should be updated explaining how to link via path:
      https://documentation.magnolia-cms.com/display/DOCS62/Link+field
      This solution is valid up until 6.2.4.
      Solution:

      Using this converterClass, coming form the default field properties:
      https://documentation.magnolia-cms.com/display/DOCS62/_Common+field+properties

      converterClass: info.magnolia.ui.editor.converter.JcrNodeToPathConverter
      

      Linking via ID (default - no converter class):

          targetPageLink:
            $type: linkField
            label: Page
            description: Choose a page to link to.
            chooser:
              workbenchChooser:
                appName: pages-app
      

      Linking via Path(using converter class):

          targetPageLink:
            $type: linkField
            label: Page
            description: Choose a page to link to.
            converterClass: info.magnolia.ui.editor.converter.JcrNodeToPathConverter
            chooser:
              workbenchChooser:
                appName: pages-app

      Use case linking via Path:

      Its more rare cases, sure. Linking via ID is the best in most cases, but:

      • Importer that deleted and re-imports the same items nightly based into the same location/structure. As its only few items (<1000) its easier tot re-create them than writing delta updates of changed values.
        => Linking via path as the id of the nodes change.
      • Independent importers running on two (or more) public nodes and the author. Generated nodes will have different ID's. Having to set on the author a link needs via Path, that it matches the public data.
      • Its functionality that was there up to <6.2, we can't remove it, customers might use it in various ways.

      Checklists

        Acceptance criteria

        Attachments

          Issue Links

            Activity

              People

                akhamis Ashraf Khamis
                cringele Christian Ringele
                Votes:
                0 Vote for this issue
                Watchers:
                5 Start watching this issue

                Dates

                  Created:
                  Updated:
                  Resolved:

                  Checklists

                    Task DoD

                    Time Tracking

                      Estimated:
                      Original Estimate - Not Specified
                      Not Specified
                      Remaining:
                      Remaining Estimate - Not Specified
                      Not Specified
                      Logged:
                      Time Spent - 5m
                      5m