[ http://jira.magnolia.info/browse/MAGNOLIA-1202?page=all ]
Anthony Ogier updated MAGNOLIA-1202:
------------------------------------
Attachment: Path.java.patch
Here's the patch
> Path.getUniqueLabel doesn't manage the trailing "/" of parent
> -------------------------------------------------------------
>
> Key: MAGNOLIA-1202
> URL: http://jira.magnolia.info/browse/MAGNOLIA-1202
> Project: magnolia
> Issue Type: Bug
> Components: document management
> Affects Versions: 3.0 RC4
> Reporter: Anthony Ogier
> Assigned To: Philipp Bracher
> Priority: Minor
> Attachments: Path.java.patch
>
> Original Estimate: 1 minute
> Remaining Estimate: 1 minute
>
> We are using a paragraph which has that iframe inside :
> <iframe id="dmsTree" frameborder="0"
> src="${pageContext.request.contextPath}/.magnolia/trees/dms.html?path=${dmsPath}/"></iframe>
> When we upload a file in the DMS Tree (with "New Document") we have an error
> because the path is doubled :
> ERROR info.magnolia.cms.core.HierarchyManager
> HierarchyManager.java(isExist:422) 10.11.2006 11:21:54 Exception caught
> javax.jcr.RepositoryException: invalid path:/parent//filename:
> '/parent//filename' is not a valid path: '' is not a legal path element:
> '/parent//filename' is not a valid path: '' is not a legal path element
> at
> org.apache.jackrabbit.core.SessionImpl.itemExists(SessionImpl.java:790)
> at
> info.magnolia.cms.core.HierarchyManager.isExist(HierarchyManager.java:419)
> at info.magnolia.cms.core.Path.getUniqueLabel(Path.java:193)
> at
> info.magnolia.module.dms.DocumentDialog.onPreSave(DocumentDialog.java:130)
> at
> info.magnolia.module.admininterface.DialogMVCHandler.save(DialogMVCHandler.java:183)
> ...
> Caused by: org.apache.jackrabbit.name.MalformedPathException:
> '/parent//filename' is not a valid path: '' is not a legal path element
> at org.apache.jackrabbit.name.Path.parse(Path.java:454)
> ...
> Here is a simple patch to Patch.getUniqueLabel to manage if the given parent
> already have a trailing "/".
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.magnolia.info/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
----------------------------------------------------------------
for list details see
http://www.magnolia.info/en/magnolia/developer.html
----------------------------------------------------------------