Page 1 of 1

OKMFolder.isValid doesnt work as documented (openkm 5.1.11)

PostPosted:Sat Oct 20, 2012 10:44 am
by pmbsa
I have been tearing my hair out now for 2 hours trying to work out what was wrong with the document path I was passing into this web service method
because it kept throwing a PathNotFoundException (the avoidance of which I understood to be its reason for being) only to discover that there is nothing at all wrong with the path but with the method its self.
If you pass in a path that does exist it works perfectly (as in a 'true' value is returned as expected). But if you pass in a path that doesnt exist (which I would have thought would result in a 'false' result as per the documentation) it throws an exception instead. Not the most useful it must be said.

The same method on OKMDocument behaves in exactly the same fashion..

Hopefully this will save somebody else from wasting any of there time.

Re: OKMFolder.isValid doesnt work as documented (openkm 5.1.

PostPosted:Mon Oct 22, 2012 6:59 am
by jllort
isValid supposes the path exists and returns only is existing path is folder, document etc... if you want to know if path exists or not ( not if it's folder or document etc... ) you should use hasNode method in Repository webservices API