[MGNLUI-6774] DOC: Link field changed formats in 6.2.4 Created: 11/Aug/20  Updated: 14/Jul/21  Resolved: 14/Jul/21

Status: Closed
Project: Magnolia UI
Component/s: None
Affects Version/s: 6.2.4
Fix Version/s: None

Type: Improvement Priority: Major
Reporter: Christian Ringele Assignee: Ashraf Khamis
Resolution: Obsolete Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: 5m
Original Estimate: Not Specified

Issue Links:
Relates
relation
is related to MGNLUI-6126 LinkField: Error if linked by path bu... Closed
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:
Epic Link: 2020 mgnl-staff requests
Sprint: UI FW 32
Story Points: 3

 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.


 Comments   
Comment by Richard Gange [ 16/Feb/21 ]

We need to have a section is known issues about this problem. So link field through version 6.2.3 (see MGNLUI-6126) was defaulting to ID. Now we are back to path. I can verify that with these two tickets:

Comment by Ashraf Khamis [ 14/Jul/21 ]

https://docs.magnolia-cms.com/product-docs/6.2/Templating/Dialog-definition/Field-definition/List-of-fields/Link-field.html has been updated several times since this ticket was created. I don't see what else needs to be documented here, and neither does Roman. Perhaps what you're looking for is already there. https://docs.magnolia-cms.com/product-docs/6.2/Templating/Dialog-definition/Field-definition.html#_common_simple_field_properties has also been recently updated with all available converter classes.

As for updating the Known issues page, that change was only to fix a compatibility problem related to automatically converting the field at the time. In our docs, it is the latest version of a branch that is always documented. The idea is to document the latest state, not everything leading up to that state.

I'm closing the ticket as Obsolete as there is nothing to update here.

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