• ZOHO Collaboration not working - Lost Update

  • We tried to make OpenKM as intuitive as possible, but an advice is always welcome.
We tried to make OpenKM as intuitive as possible, but an advice is always welcome.
Forum rules: Please, before asking something see the documentation wiki or use the search feature of the forum. And remember we don't have a crystal ball or mental readers, so if you post about an issue tell us which OpenKM are you using and also the browser and operating system version. For more info read How to Report Bugs Effectively.
 #29055  by Catscratch
 
Hi,

I successfully integrated ZOHO into openkm. It's working. Means I can open a document in ZOHO, change something and save it back to openkm.

But the collaboration is not working. If two or more users simultanously open the same document in ZOHO, everyone is editing it for himself. So one user can't see changes made by another user. Furthermore, if the users save their documents, the user who saves at last, wins. This means, if user 1 saves the document and afterwards user 2 saves the document, changes done by user 1 are overwritten.

Do you have any idea whats going wrong? Do you create a document copy for every user? Usally the users should all redirected to the same document instance in ZOHO. Seems like this is not happening.

Regards
 #29245  by Catscratch
 
I didn't found the point where you put the document into the zoho popup. Where does it happen? There must be a point where you give the zoho service an url or InputStream or something else.

Thanks!
 #29287  by Catscratch
 
Thanks for the hint.

I found the problem. It's in the sendToZoho-method. There you indeed create a copy of the document (tmp file) which you give to ZOHO. But instead of using the actual copy if another user also wants to edit the same document with ZOHO, you create another copy. That's the problem.

So if a copy already exists you try to generate other files until a new copy could be created.
createTempFile ->
Code: Select all
do {
     f = TempDirectory.generateFile(prefix, suffix, tmpdir);
} while (f.exists());
I think it would be good to check if there is already an open copy and if so, then don't create a new one, but use the open one an push the second user into the session of the first who created the copy. That's the only way to allow collaboration.
 #29317  by Catscratch
 
No, the problem is, that both edit a different copy of the same document and therefore it is not collaborative.

The problem, that the second user, who saves, overrides the changes made by the first one, is simply a result since there are two different copies of the same openkm document.

But you can solve the problem by not allowing different copies. So if a user wants to edit a document in ZOHO which was already copied by another user, the new user should NOT get another copy, but the same copy the first user created. So the same ZOHO session. You can simply check this, if you lock/checkout the document, when the first user opens it in ZOHO. Now, when another user tries to edit it in ZOHO you can see, that there is already an edit session open, because the document is still locked/checked out.
 #29329  by jllort
 
Add a ticket at http://issues.openkm.com with the link of this forum post and we'll do as soon as possible. Will not be done until 1-2 months. If you provide us the patch will go faster ( take only as a suggestion ) but during july and august will not be possible doing it

About Us

OpenKM is part of the management software. A management software is a program that facilitates the accomplishment of administrative tasks. OpenKM is a document management system that allows you to manage business content and workflow in a more efficient way. Document managers guarantee data protection by establishing information security for business content.