[MGNLSYNC-8] Synchronization Module does not work for DMS repository Created: 18/Nov/11  Updated: 29/Mar/22  Resolved: 29/Aug/12

Status: Closed
Project: Magnolia Synchronization Module
Component/s: None
Affects Version/s: 1.0
Fix Version/s: 1.0.1, 1.1.2

Type: Bug Priority: Critical
Reporter: Richard Unger Assignee: Jan Haderka
Resolution: Fixed Votes: 0
Labels: dms, synchronization
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Cloners
clones MGNLSYNC-2 The module should allow recursive rec... Closed
relation
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)
Bug DoR:
[ ]* Steps to reproduce, expected, and actual results filled
[ ]* Affected version filled
Date of First Response:
Team: Nucleus

 Description   

The synchronization module DOES NOT work correctly for the DMS repository.

Current behaviour:

When (recursively) synchronizing content from the DMS repository, folders are handled correctly, but the documents are handled incorrectly.
If a folder is inactive (red) it is NOT synchronized, however, the document nodes are synchronized regardless of their activation status. I.e. even if the document is inactive (red) it is still synchronized to the public instance.

Expected behaviour

Inactive (red) document nodes should NOT be synchronized to public instance.

I think this is because of a problem with the Syndicator. Folders are type "mgnl:content" (like pages in website tree). Document Nodes are type "mgnl:contentNode" (like paragraphs in website tree).
In website tree it is correct to synchronize all contentNode children along with their parent content, since paragraphs are always activated along with their parent page.
However, in the DMS tree this is not the case. The document-nodes (mgnl:contentNode) are activated independently of their parent folders (mgnl:content). This needs to be considered in the synchronization.

I tested this under magnolia 4.4.2 with synchronization module 1.0.0



 Comments   
Comment by Richard Unger [ 18/Nov/11 ]

Okay. Looking at the code, I think the problem is that there is no special treatment of the DMS workspace.

Synchronize module uses SynchronizationCommand:
SynchronizationCommand extends BaseActivationCommand extends RuleBasedCommand
SynchronizationCommand constructor says: setRule(getDefaultRule());
SynchronizationCommand.getDefaultRule adds the itemTypes via "this.getItemTypes()"
this.getItemTypes() is effectively RuleBasedCommand.getItemTypes()
RuleBasedCommand.getItemTypes() by default has the value itemTypes = ItemType.CONTENTNODE.getSystemName()
--> therefore the rule by default contains the itemType "mgnl:contentNode"

and this is incorrect for DMS.

In DMS, when activating this is somehow handled from the Tree --> see DMSAdminTree.getCommandContext()
But it seems the tree does not play a part when synchronizing.

I have to say: the code for activation is very complicated!!!!

Comment by Jan Haderka [ 29/Aug/12 ]

Tests committed only in master, not backported to 1.0 branch.

Generated at Mon Feb 12 07:38:57 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.