Created attachment 854183 [details] Test fodt file Description of problem: Cannot upload a .fodt file, responds with - Invalid document format for test-odt.fodt. - Transaction failed There seems to be no indication in the logs to what happened. Version-Release number of selected component (if applicable): dev How reproducible: Easy always Steps to Reproduce: 1. Sign in as admin / maintainer, go to a project and project version 2. Click Source Documents, Upload Document 3. Select the attached document and click Upload Actual results: - Invalid document format for test-odt.fodt. - Transaction failed Expected results: Upload and save Additional info: The same document, saved as an .odt, seems to work fine.
Created attachment 854189 [details] Test fodp file Same goes for .fodp (OpenDoc' Presentation)
Further testing indicates it applies to all Libreoffice .f*** (Open Document format) files. Tested using LibreOffice 3.4.5 on RHEL6.4
I haven't heard of .fodt before, so I looked it up on wikipedia: "The OpenDocument format supports the following two ways of document representation: "As a single XML document - also known as Flat XML or Uncompressed XML Files. Single OpenDocument XML files are not widely used. Filename extensions for a single OpenDocument XML documents are not defined in the OpenDocument technical specification, but commonly used are .xml, .fodt, .fods, ... etc." https://en.wikipedia.org/wiki/OpenDocument_technical_specification#Document_Representation So, we're talking about a single XML file instead of the usual "multiple XML files inside a ZIP container". As if the (compressed) ODT files weren't taking up enough space...
It appears that it isn't our parsing of the documents that is wrong, but the fact we incorrectly state we support them at all. Fix: Remove .fod* files from the list of supported filetypes in zanata-war/src/main/resources/messages.properties tag jsf.SupportedUploadFormats
https://github.com/zanata/zanata-server/pull/346
VERIFIED with Zanata 3.3.0-SNAPSHOT (20140210-0043)
Closing VERIFIED bugs for Zanata server 3.3.2.