Skip to content

Commit

Permalink
fixes(Site Copy) #29256 : Many-to-One Relationships Not Copied in Cop…
Browse files Browse the repository at this point in the history
…y Site (#29777)

### Proposed Changes
* The issue when copying Many-to-One relationships when copying a Site
was not related to the cardinality, but to the parent Contentlet of the
relationship living under System Host.
* This was causing the internal mechanism we have for retrieving related
content to NOT pick it up because such a parent lives under System Host,
not the Site that is being copied.
* We're now taking such a scenario into consideration, and now the
relationship's tree record is added as expected.
* Additionally, a configuration property named
`COPY_RELATED_CONTENT_IN_SYSTEM_HOST_CONTENTS` has been added in order
to fall back to the previous behavior, if required.
* Some code refactoring was implemented, specifically related to
renaming some variables whose purpose was not easy to understand.
* The important changes are the following: 
*
https://github.com/dotCMS/core/pull/29777/files?diff=unified&w=1#diff-1e60bfafa80721637b2ab2d1418bb840c10ddf5defdc3976ae68ab5c30c68259R1146
*
https://github.com/dotCMS/core/pull/29777/files?diff=unified&w=1#diff-1e60bfafa80721637b2ab2d1418bb840c10ddf5defdc3976ae68ab5c30c68259R1173
*
https://github.com/dotCMS/core/pull/29777/files?diff=unified&w=1#diff-1e60bfafa80721637b2ab2d1418bb840c10ddf5defdc3976ae68ab5c30c68259R1224
  • Loading branch information
jcastro-dotcms authored Aug 29, 2024
1 parent 6a2b3c2 commit acbd281
Showing 1 changed file with 213 additions and 182 deletions.
Loading

0 comments on commit acbd281

Please sign in to comment.