Download it now!
Bug 64533 - Check out of .doc and .docx documents over CMIS does not properly redirect to working copy file
Summary: Check out of .doc and .docx documents over CMIS does not properly redirect to...
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: filters and storage (show other bugs)
Version:
(earliest affected)
4.0.2.2 release
Hardware: All All
: medium major
Assignee: Not Assigned
URL:
Whiteboard: target:4.3.0 target:4.2.0.1
Keywords:
: 64615 (view as bug list)
Depends on:
Blocks:
 
Reported: 2013-05-13 11:34 UTC by Marcus Svensson
Modified: 2013-12-17 10:22 UTC (History)
5 users (show)

See Also:
Crash report or crash signature:


Attachments
cmis-client checkout .doc.txt (1.43 KB, text/plain)
2013-12-04 15:51 UTC, Marcus Svensson
Details
cmis-client checkout .odt.txt (1.47 KB, text/plain)
2013-12-04 15:52 UTC, Marcus Svensson
Details
doc checkout.ods (9.70 KB, application/vnd.oasis.opendocument.spreadsheet)
2013-12-04 15:52 UTC, Marcus Svensson
Details
doc checkout.xml (63.71 KB, text/xml)
2013-12-04 15:52 UTC, Marcus Svensson
Details
odt checkout.ods (9.49 KB, application/vnd.oasis.opendocument.spreadsheet)
2013-12-04 15:53 UTC, Marcus Svensson
Details
odt checkout.xml (113.46 KB, text/xml)
2013-12-04 15:53 UTC, Marcus Svensson
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Marcus Svensson 2013-05-13 11:34:39 UTC
Expected result:
Checking out ms office documents in LibreOffice over CMIS on Alfresco should work as expected.

Observed behaviour:
MS Office documents are checked out on the Alfresco side, however, LibreOffice does not redirect to the working copy and cannot save changes.

Steps to reproduce:

Add your Alfresco as a connector in LibreOffice
Create a new .doc (or .docx) document and save it in Alfresco
A working copy is created in Alfresco, but LibreOffice still has the original document open.

The above works just fine with .odt documents, so perhaps the file saving is handled differently for .doc and .docx documents over CMIS? It works just fine to save documents without checking them out first.
Comment 1 Marcus Svensson 2013-05-13 11:42:59 UTC
Actually this work for .docx documents but not .doc... weird.
Comment 2 Joel Madero 2013-05-16 19:19:16 UTC
Cedric - Another CMIS one, you mind testing it? Thanks in advance, I'm going to try to setup CMIS next week so I can avoid pinging you for each one
Comment 3 Marcus Svensson 2013-05-17 05:14:38 UTC
*** Bug 64615 has been marked as a duplicate of this bug. ***
Comment 4 Cédric Bosdonnat 2013-05-17 06:49:54 UTC
This sounds really weird: LibreOffice doesn't have different calls to libcmis for saving in the various formats.

To be able to reproduce, we would need to have a complete and precise scenario:
  * Version of Alfresco used
  * Initial Alfresco setup for the document. We need to know if there are special rules / document model / aspects applied to the document.
  * Exact steps to reproduce the bug from LibreOffice.

You can also get libcmis-0.3 code, compile it and try to do the same using cmis-client to see if anything strange happens during the checkout on the libcmis side.
Comment 5 Marcus Svensson 2013-05-17 07:27:08 UTC
As per: https://bugs.freedesktop.org/show_bug.cgi?id=64615 this is an issue of Alfresco 4.2.c and I'm using Alfresco 4.1.3 EE. So it is reproducible on different versions on Alfresco.

LibreOffice 4.0.2.2 on Ubunut for me, also reproduces on LibreOffice 4.0.0.3 on Windows 7.

Clean alfresco setup, with no custom stuff in it. Just a regular .doc document created in LibreOffice. As per https://bugs.freedesktop.org/show_bug.cgi?id=64615 this also reproduces on .doc documents created with MS Office.

As mentioned in my first description the steps to reproduce is:

1. Add Alfresco as an connector in LibreOffice.
2. Create a new .doc document and save it to any place in Alfresco.
3. Check out the document -> An error dialog appears.
Comment 6 Julien Nabet 2013-05-18 06:19:08 UTC
Marcus: if you launch LO from console, do you have warnings/error during problem reproduction?
Comment 7 Marcus Svensson 2013-05-20 07:31:20 UTC
(In reply to comment #6)
> Marcus: if you launch LO from console, do you have warnings/error during
> problem reproduction?

Hi Julien,

No errors in console, still the same error popup message that https://bugs.freedesktop.org/show_bug.cgi?id=64615 gets show up for me too. Are you able to reproduce this as well as in comment#5?
Comment 8 Julien Nabet 2013-05-20 17:10:01 UTC
Marcus: I know Alfresco only by name. Perhaps someone else may confirm this.
Comment 9 Vitab 2013-11-19 11:26:59 UTC
I can confirm this behavior on both LibreOffice 4.0.6 and 4.1.3.

LibreOffice 4.0.6 CMIS-url: http://<host>/alfresco/cmisws/RepositoryService?wsdl

LibreOffice 4.1.3 CMIS-url: http://<host>/alfresco/cmisatom

Also see my Bug 64615

(In reply to comment #8)
> Marcus: I know Alfresco only by name. Perhaps someone else may confirm this.
Comment 10 Marcus Svensson 2013-12-04 15:51:52 UTC
Created attachment 90241 [details]
cmis-client checkout .doc.txt
Comment 11 Marcus Svensson 2013-12-04 15:52:08 UTC
Created attachment 90242 [details]
cmis-client checkout .odt.txt
Comment 12 Marcus Svensson 2013-12-04 15:52:28 UTC
Created attachment 90243 [details]
doc checkout.ods
Comment 13 Marcus Svensson 2013-12-04 15:52:48 UTC
Created attachment 90244 [details]
doc checkout.xml
Comment 14 Marcus Svensson 2013-12-04 15:53:15 UTC
Created attachment 90245 [details]
odt checkout.ods
Comment 15 Marcus Svensson 2013-12-04 15:53:35 UTC
Created attachment 90246 [details]
odt checkout.xml
Comment 16 Marcus Svensson 2013-12-04 15:54:00 UTC
I've traced the traffic between the libreoffice client and the Alfresco server and have attached the results here to this bug.

Checking out an odt document will result in eight requests to Alfresco. (odt checkout.ods)

Checking out a doc document will result in just five requests to Alfresco, where the missing requests are important ones, used for opening the working copy. (doc checkout.ods)

It seems like this problem is in LibreOffice, I've tried the check-out action using the cmis-client in the libcmis library and it works fine, producing the same results on both odt documents and doc documents (See cmis-client checkout .doc.txt and cmis-client checkout .odt.txt).

Attached is also the captured session in Charles proxy (xml) for both the working call (odt checkout.xml) and the not working call (doc checkout.xml).
Comment 17 Cédric Bosdonnat 2013-12-05 08:19:48 UTC
Reproduced on master branch with Alfresco community svn build.
Comment 18 linzhixing 2013-12-11 19:58:20 UTC
How is this bug going now?
I reproduced on LibreOffice4.1.3.2 with Alfresco Community version 4.2.e and
also with a CMIS compliant server called NemakiWare(http://nemakiware.com/), which I have developed.

In both cases, after one checked out a document(.txt, .odt) successfully, it does not redirect to PWC but still remains the original file.
So I closed Libreoffice once, then opened a PWC.

In addition, strange to say, PWC is not showed in the folder navigation on NemakiWare(this is allowed by CMIS specs), but when I selected a file after reopening LibreOffice, it seemed to be directed to its PWC.
Comment 19 Commit Notification 2013-12-13 09:48:02 UTC
Cedric Bosdonnat committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=a68e0e334df02c1ca47601575523b23c6db13470

Fixed the update to working copy and back after (cancel) checkout: fdo#64533



The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds
Affected users are encouraged to test the fix and report feedback.
Comment 20 Cédric Bosdonnat 2013-12-13 09:50:40 UTC
Fixed in master, review requested for 4.2
Comment 21 Marcus Svensson 2013-12-13 17:05:57 UTC
I've started doing some testing on this and found one issue when working with .doc documents:


Check in does not redirect to checked in copy after check in
1. Check out an .doc document.
2. Make changes
3. Check in
The document is checked in in Alfresco, however LibreOffice is not redirected to the checked in version and stays on the working copy. Issuing a new save now will create a new document in Alfresco with the "Working copy name".

Everything works with docx documents and odt documents. It is just the doc documents that do not.

Same issue with all three endpoints

Will continue testing to see if anything else appears.
Comment 22 Marcus Svensson 2013-12-13 17:06:50 UTC
To clarify: I'm testing against the master branch after the last patch was added by Cedric.
Comment 23 Marcus Svensson 2013-12-13 17:42:48 UTC
I've observed the same behaviour on both Alfresco Enterprise 4.2.0 and on Alfresco Enterprise 4.1.5.
Comment 24 Commit Notification 2013-12-17 10:22:14 UTC
Cedric Bosdonnat committed a patch related to this issue.
It has been pushed to "libreoffice-4-2":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=b95f4fad1acc01857cdc83af23506a4bce6c4ccd&h=libreoffice-4-2

Fixed the update to working copy and back after (cancel) checkout: fdo#64533


It will be available in LibreOffice 4.2.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds
Affected users are encouraged to test the fix and report feedback.