[LIVECOPY-267] Relink action is not relinking properties at the node page level Created: 17/Jun/21  Updated: 09/Sep/21  Resolved: 13/Jul/21

Status: Closed
Project: Live Copy
Component/s: None
Affects Version/s: 3.2.3
Fix Version/s: 3.2.4

Type: Improvement Priority: Neutral
Reporter: Mercedes Iruela Assignee: Chuong Doan Huy
Resolution: Fixed Votes: 0
Labels: VN-Implementation, VN-Maintenance, VN-Testing, maintenance
Remaining Estimate: Not Specified
Time Spent: 3d 4.5h
Original Estimate: Not Specified

Attachments: PNG File Screenshot 2021-06-30 at 11.56.19.png    
Issue Links:
Relates
relates to LIVECOPY-273 Relink action doesn't work for linkFi... Closed
dependency
depends upon LIVECOPY-271 [Test after LIVECOPY-272] Relink feat... Closed
relation
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)
Date of First Response:
Epic Link: Live Copy maintenance
Sprint: Content Mngmt 7, Content Mngmt 08
Story Points: 5

 Description   

Steps to reproduce (Using travel demo)

  1.  Travel Home template is using a Page Properties dialog that includes a linkfield in the Search tab (Field Search result page)
  2.  Create a livecopy of travel and rename it to mytravel
  3. Use the relink action.

Expected results

All links in the page and in subnodes are relinked.

Actual results

All is relinked except properties at the page level included by Page Property dialog. If the livecopy home page is opened it can be seen that the value of the search result page is pointing to travel instead of mytravel).

Workaround

NO

Development notes

info.magnolia.livecopy.actions.rewire.RewirePageLinksHelper.rewritePageLinks(Node, boolean) is in charge of rewrite links in pages, it gets childnodes of the page and rewrite all its links, but ignores the links properties in the page itself.
It might be useful to call this also at page level and not only from child nodes:

 for (Node slaveContentNode : slaveChildContentNodes) {
                compatibilityRewirePageLinksHelper.rewriteLinksForNode(slaveContentNode, masterSiteDefinition, protectFieldAfterRewire);
                standardRewirePageLinksHelper.rewriteLinksForNode(slaveContentNode, masterSiteDefinition, protectFieldAfterRewire);
}


 Comments   
Comment by Oanh Thai Hoang [ 30/Jun/21 ]

Hi miruela, due to document from LC, https://docs.magnolia-cms.com/product-docs/6.2/Special-Features/Live-Copy/Live-Copy-module.html#_managing_links. The relink just support for fields inside components not for page properties, even LC 2.x in Magnolia 5.7 does not support for page properties. So this is not a bug at all. Shall we close it as not a bug and won't fix?

Comment by Oanh Thai Hoang [ 30/Jun/21 ]

Hi miruela, I'm closing now since this not a bug and out of scope as previous comment. Feel free to reopen if you had any things. Thank you

Comment by Mercedes Iruela [ 30/Jun/21 ]

Should it be an improvement instead? if there are links that point to the site itself it makes sense that it is relinked, for example see page properties in travel demo them, where the search page is configured pointing to an internal page.

Comment by Oanh Thai Hoang [ 30/Jun/21 ]

Hi miruela, Honestly, I really don't know why in the past (since 5.7), no relink support for page properties at all.

Hi ldelnevo, could u help to decide do you wanna support new improvement as Mercedes suggest above. I just a little bit wonder, I'm not sure about performance issues if we do (related to https://jira.magnolia-cms.com/browse/LIVECOPY-230). It's up to you to decide and if yes, feel free to reopen it

Comment by Oanh Thai Hoang [ 01/Jul/21 ]

Hi miruela, thanks for your detail explanation. I reopen and mark as improvement like you suggest

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