Details
-
Bug
-
Resolution: Won't Do
-
Minor
-
None
-
1.1
-
None
-
-
Empty show more show less
Description
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 "/".