[MGNLACTIVATION-20] CLONE - Activation problem with MixinType "lockable" Created: 20/Mar/13 Updated: 24/Jun/13 Resolved: 20/Mar/13 |
|
| Status: | Closed |
| Project: | Activation |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | 5.0 |
| Type: | Bug | Priority: | Critical |
| Reporter: | Jaroslav Simak | Assignee: | Jaroslav Simak |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Attachments: |
|
||||||||||||
| 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)
|
||||||||||||
| Bug DoR: |
[ ]*
Steps to reproduce, expected, and actual results filled
[ ]*
Affected version filled
|
||||||||||||
| Description |
|
We have another problem on activating our content. The problem is that nodes which where created by the "NodeUtil.createPath" of the magnolia-core, don't have the MixinType "lockable". This will cause a output in the error log. public static Node getOrCreateNode(Node parent, String relPath, String primaryNodeTypeName) throws RepositoryException, PathNotFoundException, AccessDeniedException { return createPath(parent, relPath, primaryNodeTypeName, false); } public static Node createPath(Node parent, String relPath, String primaryNodeTypeName, boolean save) throws PathNotFoundException, ItemExistsException, VersionException, ConstraintViolationException, LockException, RepositoryException { // remove leading / String currentPath = StringUtils.removeStart(relPath, "/"); if (StringUtils.isEmpty(currentPath)) { // Here we add the MixinType lockable parent.addMixin(JcrConstants.MIX_LOCKABLE); return parent; } Node root = parent; String[] names = currentPath.split("/"); for (int i = 0; i < names.length; i++) { String name = names[i]; if (root.hasNode(name)) { root = root.getNode(name); // Here we add the MixinType lockable root.addMixin(JcrConstants.MIX_LOCKABLE); } else { final Node newNode = root.addNode(name, primaryNodeTypeName); // Here we add the MixinType lockable root.addMixin(JcrConstants.MIX_LOCKABLE); if (save) { root.getSession().save(); } root = newNode; } } return root; } But the problem isn't solved. The MixinType is set to the Nodes (as you can see in the exported xml file) but the error still appear. The strange thing is, that it only appears at Nodes of the type "dataItemNode". Maybe it's a sub of http://jira.magnolia-cms.com/browse/MAGNOLIA-4872. Thanks in advance. Best regards |