[LIVECOPY-411] Wrong structure created when pushing to more than one copy Created: 31/Jul/23  Updated: 18/Oct/23  Resolved: 26/Sep/23

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

Type: Bug Priority: Major
Reporter: Mercedes Iruela Assignee: Thuy To
Resolution: Fixed Votes: 0
Labels: cs-bk
Remaining Estimate: 0d
Time Spent: 10d 2.5h
Original Estimate: Not Specified

Attachments: PNG File image-2023-08-25-12-32-15-127.png     PNG File image-2023-08-25-12-35-15-692.png     Zip Archive starterkit.zip     File website.master.c24.yaml     File website.master0.c24.yaml     File website.master1.c24.yaml     File website.master2.c24.yaml    
Issue Links:
Cloners
is cloned by LIVECOPY-431 Port to master - Wrong structure crea... Closed
Relates
relation
is related to LIVECOPY-417 Improve unit tests for getDialogId in... Closed
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
[ ]  Architecture Decision Record (ADR)
Bug DoR:
[X]* Steps to reproduce, expected, and actual results filled
[X]* Affected version filled
Date of First Response:
Epic Link: AuthorX Support
Story Points: 5
Team: AuthorX
Work Started:
Approved:
Yes

 Description   

Steps to reproduce

  1. install lightmodule
  2. import website.master.yaml in website
  3. create two live copies (or even 3 like me, see image-4.png)
  4. delete the c24 page in every copy (so that you emulate the first creation of the live copy of that page)
  5. create live copy on c24 (see image-5.png)
  6. select all the copies (see image-6.png)
  7. after creation it looks like image-7.png
  8. check jcr (in my case master0 live copy has a wrong header)

Expected results

All copies are generated with the same structure

Actual results

Some copies are adding an extra node

Workaround

No

Development notes

This issue has been detected in three different use cases, but all of them related to complex fields.

  • forms (component with area parallel to complex field)
  • content carousel (component with area parallel to complex field)
  • accordion (component with area parallel to complex field)

If we has 3 copies, it has been detected that copy0 and copy2 are including this extra nodes:

        'header':
          'jcr:uuid': '75180338-5a39-46a4-80df-0d4c1ad65460'
          'mgnl:removeIfEmpty': true

Exports from master and the 3 copies can be found attached in the ticket.



 Comments   
Comment by Thuy To [ 25/Aug/23 ]

Discovery

Node /master2/c24/main/0/elements/header is an error node which is added while rewriting Page Links. 

rewirePageLinksHelper.rewritePageLinks(node, false)

+ When coping from the master content node to a new node, it doesn't contain [Node /master2/c24/main/0/elements/header ]

+ An error header node is created from line 171 in
handleCompositeField method of StandardRewirePageLinksHelper class 

Optional<Node> compositeNode = itemProvider.get().read(slaveContentNode, locale);

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