Ate Douma pushed to branch master at cms-community / hippo-repository
Commits: c5ac574b by Ate Douma at 2017-08-09T07:59:43+02:00 REPO-1764 restore accidentally overwritten fix from REPO-1759 - - - - - 1 changed file: - engine/src/main/java/org/onehippo/cm/engine/autoexport/DefinitionMergeService.java Changes: ===================================== engine/src/main/java/org/onehippo/cm/engine/autoexport/DefinitionMergeService.java ===================================== --- a/engine/src/main/java/org/onehippo/cm/engine/autoexport/DefinitionMergeService.java +++ b/engine/src/main/java/org/onehippo/cm/engine/autoexport/DefinitionMergeService.java @@ -695,8 +695,10 @@ public class DefinitionMergeService { for (final ConfigurationNodeImpl childConfigNode : configNode.getNodes().values()) { for (final DefinitionNodeImpl childDefItem : childConfigNode.getDefinitions()) { // if child's DefinitionNode was part of a parent Definition, it may have already been removed + // also check the definition belongs to one of autoexport modules final AbstractDefinitionImpl childDefinition = childDefItem.getDefinition(); - if (!alreadyRemoved.contains(childDefinition)) { + if (!alreadyRemoved.contains(childDefinition) + && isAutoExportModule(toExport.values(), childDefinition.getSource().getModule())) { // otherwise, remove it now removeOneDefinitionItem(childDefItem, alreadyRemoved, toExport); } @@ -705,6 +707,10 @@ public class DefinitionMergeService { } } + private boolean isAutoExportModule(final Collection<ModuleImpl> autoExportModules, final ModuleImpl candidate) { + return autoExportModules.contains(candidate); + } + /** * Remove one definition item, either by removing it from its parent or (if root) removing the entire definition. * Recurs up the DefinitionItem tree to clean up newly-emptied items. View it on GitLab: https://code.onehippo.org/cms-community/hippo-repository/commit/c5ac574b1048eb446342772667e79262d680d015 --- View it on GitLab: https://code.onehippo.org/cms-community/hippo-repository/commit/c5ac574b1048eb446342772667e79262d680d015 You're receiving this email because of your account on code.onehippo.org.
_______________________________________________ Hippocms-svn mailing list Hippocms-svn@lists.onehippo.org https://lists.onehippo.org/mailman/listinfo/hippocms-svn