[LIVECOPY-408] Relink action doesn't work for switchable field inside a complex structure Created: 20/Jun/23  Updated: 14/Aug/23  Resolved: 14/Aug/23

Status: Closed
Project: Live Copy
Component/s: None
Affects Version/s: 3.2.10
Fix Version/s: 3.2.12

Type: Bug Priority: Neutral
Reporter: Mercedes Iruela Assignee: Antonín Juran
Resolution: Fixed Votes: 0
Labels: Nucleus_AuthX_Support
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Problem/Incident
Relates
relates to LIVECOPY-310 Relink doesn't work for compositeFiel... Closed
causality
Template:
Acceptance criteria:
Empty
Task DoD:
[X]* Doc/release notes changes? Comment present?
[X]* Downstream builds green?
[X]* Solution information and context easily available?
[X]* Tests
[X]* FixVersion filled and not yet released
[X]  Architecture Decision Record (ADR)
Bug DoR:
[ ]* Steps to reproduce, expected, and actual results filled
[ ]* Affected version filled
Documentation update required:
Yes
Date of First Response:
Epic Link: AuthorX Support
Team: AuthorX
Work Started:
Approved:
Yes

 Description   

Steps to reproduce

  1.  use this dialog definition in a template, for example, in HTML
    label: C22 Teaser group 
    form:
      properties:
        header:
          label: Component header
          $type: compositeField
          itemProvider:
            $type: jcrChildNodeProvider
        teasers:
          $type: jcrMultiField
          label: Teasers
          minItems: 2
          maxItems: 3
          field:
            $type: compositeField
            label: ""
            properties:
              teaser:
                $type: switchableField
                label: Teaser type (internal/external)
                field:
                  name: type
                  $type: radioButtonGroupField
                  layout: horizontal
                  datasource:
                    $type: optionListDatasource
                    options:
                      - name: internal
                        value: internal
                        label: Internal
                      - name: external
                        value: external
                        label: External
                  defaultValue: internal
                itemProvider:
                  $type: jcrChildNodeProvider
                forms:
                  - name: internal
                    properties:
                      internalTeaser:
                        $type: pageLinkField
                        showOptions: true
                        textInputAllowed: true
                        converterClass: info.magnolia.ui.editor.converter.JcrNodeToPathConverter 
                  - name: external
                    properties:
                      externalTeaser:
                        $type: linkField
                        label: link to external Teaser
                        datasource:
                          $type: jcrDatasource
                          workspace: teaserPool
    
  2. Add the component in the master.
  3. Push changes to the copy including Automatically relink (it also happens if the actions is done after pushing with action Relink all pages to livecopy pages

Expected results

Internal links inside the switchable link are relinked to the copy.

Actual results

Internal links keep pointing to the master

Workaround

Keep it simple and try to use switchable fields in the first layer instead of inside a multifield > composite.

Development notes

It works when switchable field is at the first level, not inside complex fields like multifield or composite field


Generated at Mon Feb 12 02:28:26 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.