[MAGNOLIA-625] Saving without nodeCollection fails Created: 31/Jan/06 Updated: 23/Jan/13 Resolved: 03/Feb/06 |
|
| Status: | Closed |
| Project: | Magnolia |
| Component/s: | core |
| Affects Version/s: | 3.0 Beta 1 |
| Fix Version/s: | 3.0 Beta 1 |
| Type: | Bug | Priority: | Major |
| Reporter: | Ralf Hirning | Assignee: | Philipp Bärfuss |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | 0.5h | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | 0.5h | ||
| Environment: |
Win XP |
||
| 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: |
| Description |
|
In info.magnolia.cms.gui.control.Save.getSaveNode(HierarchyManager hm, Content rootNode) is a check for the nodeCollectionName. The nodeCollectionName is a String which is initialized as StringUtils.EMPTY, but it is checked against null. If you want to save something directly in a page a org.apache.jackrabbit.name.MalformedPathException is thrown. Could you please change the code snippet in getSaveNode(HierarchyManager hm, Content rootNode) // get or create nodeCollection to something like // get or create nodeCollection thanks Ralf |
| Comments |
| Comment by Ralf Hirning [ 31/Jan/06 ] |
|
Not only the nodeCollectionName is problematic, but the nodeName as well. This method works with me: protected Content getSaveNode(HierarchyManager hm, Content rootNode) throws AccessDeniedException, // get or create nodeCollection catch (RepositoryException re) { } // get or create node catch (RepositoryException re) { node = nodeCollection.createContent(this.getNodeName(), ItemType.CONTENTNODE); return node; Ralf |
| Comment by Philipp Bracher [ 03/Feb/06 ] |
|
fixed
|