Web UI behaviour not consistent with CIFS behaviour.
How to reproduce?
1) on a fresh 3.1sp2 alfresco, in company home create two folders:
one subfolder 'sub1' under 'folder1' and put a test file with 'sub1'
var source = companyhome.childByNamePath("folder1");
var destination = companyhome.childByNamePath("folder2");
copied = source.copy(destination);
upload it to "Company Home > Data Dictionary > Scripts"
and run it calling the URL:
http://localhost:8080/alfresco/command/script/execute?scriptPath=/Company Home/Data Dictionary/Scripts/alex_test1.js
3) in 'folder1', delete the subfolder 'sub1' (This space and all its contents) using the web UI
4) now try to browse 'folder2'
A) With the web UI:
browsing 'folder2' and going to
with the web UI, you can see 'sub1' but clicking on it raise an error:
Unable to find the repository item referenced by Id: 577fce57-97d3-414a-857e-e5ff1c976113 - the record has probably been deleted from the database.
B) With CIFS
however, if you mount alfresco by cifs:
mount -t cifs -o username=admin,password=admin //localhost/alfresco /mnt/
you can still access 'sub1':
ls -1 /mnt/folder2/folder1/sub1
I raise this as a bug as
1) CIFS and Web UI behaviour is NOT consistent: one can see a sub folder using one protcol but not the other
2) The copy() behaviour does not seem to follow the API documentation at:
ScriptNode copy(ScriptNode destination)
Copies the node to the specified destination node. The newly copied ScriptNode instance is returned on success or null is returned if the copy fails reason. Note that children of the source node are not copied.
as here the children seem to be copied (and in fact they are half copied).
Other tests done:
A similar test made with the other API fonction "copy(ScriptNode destination, boolean deepCopy)" where deepCopy is 'true' works as expected.
Support also tested with 3.2sp1 and the issue does not appear anymore:
the children are NOT copied anymore, as described in the documentation.
a search in Jira for the error message linked to: