[MGNLUI-4542] Support link to resources for Link field Created: 06/Aug/18  Updated: 09/Mar/20  Resolved: 09/Mar/20

Status: Closed
Project: Magnolia UI
Component/s: None
Affects Version/s: 5.6.7, 5.7.1
Fix Version/s: None

Type: Improvement Priority: Neutral
Reporter: Viet Nguyen Assignee: Unassigned
Resolution: Workaround exists Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Relates
Template:
Acceptance criteria:
Empty
Task DoD:
[ ]* Doc/release notes changes? Comment present?
[ ]* Downstream builds green?
[ ]* Solution information and context easily available?
[ ]* Tests
[ ]* FixVersion filled and not yet released
[ ]  Architecture Decision Record (ADR)
Date of First Response:

 Description   

Add link field for resources App to their css/js resources, the link field open the dialog well and let me select a resource, but when saving this files it gives me an error as attached, because this resource is not real jcr node but it reflects the files in the module.
The issue caused by default 'identifierToPathConverter' of our Link fields which is a BaseIdentifierToPathConverter that "convert a UUID to a Path and Path to UUID. In general, if the translation is not possible, return null."
Fixing by implement a custom converter for your interest.



 Comments   
Comment by Richard Gange [ 09/Mar/20 ]

I'm using 5.7.5 and I can link just fine using this configuration.

form:
  tabs:
    - name: tabMain
      label: Link
      fields:
        - name: linkField
          fieldType: link
          label: Link It
          targetWorkspace: resources
          appName: resources
            
actions:
  commit:
    class: info.magnolia.ui.admincentral.dialog.action.SaveDialogActionDefinition
  cancel:
    class: info.magnolia.ui.admincentral.dialog.action.CancelDialogActionDefinition
Comment by Richard Gange [ 09/Mar/20 ]

I think that using identifierToPathConverter is not appropriate for the Resource Files app since you are operating on multiple sources.

Generated at Mon Feb 12 09:17:40 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.