Release Notes / Version 11.2210
Table Of ContentsPrior to addressing this issue, you may have observed auto-merge conflicts, for example, when a still linked content in the derived site got deleted, or when there are two derived contents (one of them linked) in the same site, which reference the same master. While auto-merge issues in these scenarios may still happen, a prediction mechanism tries to resolve these conflicts at best effort now.
To support additional behavior for deleted contents in auto-merge scenarios, new methods have been introduced, related to
Content.getLastPath()
, which is the path of a deleted content it had prior to its deletion. In the similar way, you can now access the
last site
of a deleted content:
com.coremedia.cap.multisite.ContentObjectSiteAspect#getLastSite(): Site | null
com.coremedia.cap.multisite.ContentObjectSiteAspect#findLastSite(): Optional<Site>
For a deleted content wrapped in a
ContentSiteAspect
the method
getDirectlyDerived
is now able using the "best match" approach for ambiguous scenarios, such as, that a given master content has two derived contents in a given site. While this state should be prevented (validators will warn editors), the "best match" API prefers the derived content having the same relative path. This is now also applicable for master contents which got deleted.
Note, that in such ambiguous states, a warning will be filed (as before, but method name changed from
getDirectlyDerived
to
findBest
), like:
`findBest(Site:derived-site-id)`: Multiple directly derived contents for master
coremedia:///cap/content/24
. Consider runningcm validate-multisite
. Random content chosen from candidates:coremedia:///cap/content/42
. All directly derived in given site (#2):coremedia:///cap/content/42
,coremedia:///cap/content/44
(CMS-19909)