https://bugs.freedesktop.org/show_bug.cgi?id=62531
--- Comment #15 from Marcus Svensson <[email protected]> --- I've been investigating this some more. This might have something to do with libcmis and not libreoffice. I setup a proxy using charles through which I routed all libreoffice requests through to be able to see what was wrong. I was using Alfresco enterprise 4.2.0, but the same results can probably be reproduced in earlier versions. Using the old legacy endpoint /alfresco/service/cmis checking out will work using atom. This is because the returned cmis document on the checkout request is different to what is returned in the newer endpoints /alfresco/cmisatom (now also deprecated as of 4.2) and /alfresco/api/-default-/public/cmis/versions/1.0/atom. The newer endpoints also include information about relationships to other objects as specified in the cmis spec. Below is a snippet of the 5th request made on a checkout to the Alfresco server, the first one is on the working legacy endpoint, and the second is the failing newer endpoint. 1. http://localhost:8080/alfresco/service/cmis/s/workspace:SpacesStore/arg/p?path=%2FSites%2Flibreoffice-test%2FdocumentLibrary%2FTest%20document%20%28Working%20Copy%29.odt&filter=&includeAllowableActions=true&includePolicyIds=&includeRelationships=&includeACL=&renditionFilter= 2. http://localhost:8080/alfresco/cmisatom/be392f77-bc41-4794-9367-f5b1cf00984b/path?path=%2FSites%2Flibreoffice-test%2FdocumentLibrary%2F76%7Cworkspace%3A%2FSpacesStore%2F5d8908d9-1b4a-4265-b1de-5d7244fcea70%7Cworkspace%3A%2FSpacesStore%2F3885d9a2-0540-41ab-810a-38ccb1b160d6%7C%7Bhttp%3A%2Fwww.alfresco.org%2Fmodel%2Fcontent%2F1.0%7Dworkingcopylink&filter=&includeAllowableActions=true&includeACL=&includePolicyIds=&includeRelationships=&renditionFilter= What is different in these two is the path argument. Libcmis parses the file name (cmis:name property from the response atom xml) and appends it to the path to the document to open. In the legacy response there is only one cmis:name property available in the xml which is equal to the file name: <pre> <cmisra:object> <cmis:properties> ... <cmis:propertyString displayName="Name" propertyDefinitionId="cmis:name" queryName="cmis:name"> <cmis:value>Test document (Working Copy).odt</cmis:value> </cmis:propertyString> ... </cmis:properties> </cmisra:object> </pre> In the new endpoints there can be several occurances of this property in different parts of the response xml such as: <pre> <cmisra:object> <cmis:properties> ... <cmis:propertyString displayName="Name" propertyDefinitionId="cmis:name" queryName="cmis:name"> <cmis:value>Test document (Working Copy).odt</cmis:value> </cmis:propertyString> ... </cmis:properties> <cmis:relationship> <cmis:properties> <cmis:propertyString displayName="Name" localName="name" propertyDefinitionId="cmis:name" queryName="cmis:name"> <cmis:value>75|workspace://SpacesStore/3885d9a2-0540-41ab-810a-38ccb1b160d6|workspace://SpacesStore/5d8908d9-1b4a-4265-b1de-5d7244fcea70|{http://www.alfresco.org/model/content/1.0}original</cmis:value> </cmis:propertyString> ... <cmis:propertyString displayName="Name" localName="name" propertyDefinitionId="cmis:name" queryName="cmis:name"> <cmis:value>76|workspace://SpacesStore/5d8908d9-1b4a-4265-b1de-5d7244fcea70|workspace://SpacesStore/3885d9a2-0540-41ab-810a-38ccb1b160d6|{http://www.alfresco.org/model/content/1.0}workingcopylink</cmis:value> </cmis:propertyString> </cmis:properties> </cmis:relationship> </cmisra:object> </pre> >From what I could find in the source code of libcmis in it seems that it does not select the correct occurance of the cmis:name property, it uses the last found in the document (which is the one found in the cmis:relationship) which is not correct. This is also why you will see 1.0}workingcopylink in the title bar in libreoffice when you check out a document. My C++ is a bit rusty, so I'm not sure that I'm able to fix this in an quick way, perhaps someone else could look at it? It would be pretty easy I guess to write a test case in the libcmis module which reproduce this error. I've attached logs of the requests made to Alfresco and the resulting atom response on the checkout action. I hope my investigation is useful! -- You are receiving this mail because: You are the assignee for the bug.
_______________________________________________ Libreoffice-bugs mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/libreoffice-bugs
