Details
-
Bug
-
Status: Closed
-
Resolution: Fixed
-
6.1.1 CE GA2, 6.1.20 EE GA2
-
Tested with OS VIsta, MS Office 2007, ie7
-
6.1.x
-
Committed
-
4
Description
Steps to reproduce:
- Create new document with some MS Office file (doc, docx, xls, xlsx, ppt or pptx) on your computer. Do not specify any custom title.
- Try "Open in MS Office" (see
LPS-28718for supported configurations, I've used ie7 in Vista with MS Office in WIN XP SP2 compatibility mode). No problem here, file opens and is editable. Important part is, that the correct MS Office program is launched. - From the portal, edit the file and change the Title to not contain any file extension (e.g., "Title").
- Publish new file version and version 1.1 is created
- Try "Open in MS Office" on the new version (1.1).
Result:
Nothing happens. No Javascript error, no error in Liferay UI. No MS Office program is opened in OS.
Expected Result:
File is opened in MS Office program in OS, with the file being writable.
Details:
In 6.1, we allow user to specify title for every FileEntry, when uploading new document or editing / updating an existing one. If none is provided, we use the name of the file, that is being uploaded to the Document Library as part of the request.
For "Edit Document Online", ActiveX object is used, with WebDAV URL to the document. This WebDAV URL has the current version's Title at the end. This seems to prevent the ActiveX API to detect the document type and open accordingly selected MS Office program in OS. The Javascript call to ActiveX API is silently ignored.
Possible fixes:
- Add input validator, which will make sure, that Title includes the correct extension for MS Office files (if user wants to use custom Title, different from uplaoded-file name).
- Do not form WebDAV URLs for Online Editing with Title at the end of URL. E.g. use /api/secure/webdav/by-uuid/.../<file_UUID>.doc in the URL and then change the WebDAV servlet to lookup files based on UUID and not the folder name & Title like now.