[LIVECOPY-323] Slave specific components are reordered after master push Created: 11/Jul/22 Updated: 18/Jul/22 Resolved: 18/Jul/22 |
|
| Status: | Closed |
| Project: | Live Copy |
| Component/s: | None |
| Affects Version/s: | 3.2.8 |
| Fix Version/s: | None |
| Type: | Improvement | Priority: | Critical |
| Reporter: | Richard Gange | Assignee: | Unassigned |
| Resolution: | Duplicate | Votes: | 1 |
| Labels: | None | ||
| Remaining Estimate: | 0d | ||
| Time Spent: | 5h | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||
| 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)
|
||||||||||||
| Documentation update required: |
Yes
|
||||||||||||
| Date of First Response: | |||||||||||||
| Epic Link: | Support | ||||||||||||
| Description |
|
Components which are unique to the slave site are reordered to the bottom after a master push. Reproduce
Expected Actual Notes To be considered:
Also how to handle a referenced area which has had referenced nodes moved around. What if master has been reordered one way and the referenced ordered another way (purposely). Or is this scenario not supported? In other words, is the order of the master is always respected on a push? I think the only feasible option is to say the master always controls the order of referenced nodes but perhaps needs to be explicitly documented. OR maybe another possibility is if the number of nodes in the master are is not equal to the number of nodes in the referenced area then ordering is not performed. For example: /**
* Order the nodes present on the reference page like ordered on the master page.
*/
protected void orderContentNodesInArea(Node masterContentArea, Node referenceContentArea)
throws RepositoryException {
NodeIterator masterContentChildNodes = masterContentArea.getNodes();
NodeIterator referencedContentChildNodes = referenceContentArea.getNodes();
Long masterSize = masterContentChildNodes.getSize();
if (masterSize != referencedContentChildNodes.getSize()) {
String path = referenceContentArea != null ? referenceContentArea.getPath() : "";
log.info("Skipping reordering of referenced content area {} becuase of size mismatch.", path);
}
else if (masterSize > 1) {
Node masterContentChildNode = masterContentChildNodes.nextNode();
...
...
|