Page 1 of 1

Folder Node script does not work in 5.1.9 (7447)

PostPosted:Wed Mar 21, 2012 9:10 pm
by ngovinda
I have been using a script in a node (folder) to rename all created folders under it, successfully in 5.1.7 see code below:
Code: Select all
import javax.jcr.*;
import com.openkm.core.*;
import com.openkm.bean.*;
import com.openkm.api.OKMDocument;

String userID = session.getUserID();
String parentDir = com.openkm.util.FileUtils.getParent(eventNode.getPath());
String docName = com.openkm.util.FileUtils.getName(eventNode.getPath());

if (eventType.equals("CREATE_FOLDER")) {
        session.move(eventNode.getPath(), parentDir + "/" +  userID + " " + docName);
        session.save();
}
It did not work when I migrated to 5.1.8.
It did not also work when I did a clean install of 5.1.8 and created the script.
I tried it in a clean install of 5.1.9 and it did not work.

Any help is very much appriciated.

Regards - Govinda

Re: Folder Node script does not work in 5.1.9 (7447)

PostPosted:Sun Mar 25, 2012 2:05 pm
by pavila
The script should work. Have you tried a recent night build from http://integration.openkm.com/5.1.x/ ?

Re: Folder Node script does not work in 5.1.9 (7447)

PostPosted:Mon Mar 26, 2012 1:52 pm
by ngovinda
Thanks Pavila.

I downloaded the night build
http://integration.openkm.com/5.1.x/ as suggested by you. I replaced the OpenKm.war and edited OpenKM.cfg from none to upgrade. but I am getting the following error:
Code: Select all
OKM-022024 (getEnablesExtensions): OKM-022024
could not load an entity: [com.openkm.dao.bean.Profile#3]
OKM-014024(getUserWorkspace): OK-014024
I had also delted the work and tmp directories and changed update to none, but I am getting the same error

Regards - Govinda

Re: Folder Node script does not work in 5.1.9 (7447)

PostPosted:Tue Mar 27, 2012 6:51 pm
by pavila