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

Provide compatibility to asset links

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Neutral
    • 6.2.7
    • None
    • None
    • None

    Description

      Scenario:
      Due to MGNLUI-5840, asset references have been stored without the prefix jcr:. When opening their corresponding dialog, which is declared with the old syntax, these references are throwing an error like the following:

      java.lang.IllegalArgumentException: 507b0635-d1b1-49ab-99d4-451751e0fd08 is not a valid ItemKey

      Removing targetWorkspace property from the definition makes it work ok but, unfortunately, preview is not shown as reported in MGNLUI-5979.
      Steps to reproduce (Magnolia 6.2.3)

      1. Create a component whose dialog contain following field:
        - name: cinemagraph
                  class: info.magnolia.ui.form.field.definition.LinkFieldDefinition
                  required: true
                  targetWorkspace: dam
                  appName: assets
                  identifierToPathConverter:
                    class: info.magnolia.ui.form.field.converter.BaseIdentifierToPathConverter
                  contentPreviewDefinition:
                    contentPreviewClass: info.magnolia.dam.app.ui.field.DamFilePreviewComponent 
      2. Store any link by using the dialog (Note the preview is shown in the dialog) and remove the jcr: prefix from the reference through JCR app (Forcing MGNLUI-5840)
      3. Open the component dialog again and see the error.
      4. Remove targetWorkspace property from the definition and open the component dialog again. It works ok and no error is thrown now but preview is not shown in the dialog

      Expected results
      There should be compatibility for assets that were stored without jcr: prefix.

      Checklists

        Acceptance criteria

        Attachments

          Issue Links

            Activity

              People

                sang.ngo Sang Ngo Huu
                jayala Jonathan Ayala
                Votes:
                0 Vote for this issue
                Watchers:
                5 Start watching this issue

                Dates

                  Created:
                  Updated:
                  Resolved:

                  Checklists

                    Bug DoR
                    Task DoD

                    Time Tracking

                      Estimated:
                      Original Estimate - Not Specified
                      Not Specified
                      Remaining:
                      Remaining Estimate - Not Specified
                      Not Specified
                      Logged:
                      Time Spent - 1d 17m
                      1d 17m