cancel
Showing results for 
Search instead for 
Did you mean: 

4.2.c Google Docs Broken

pneumatic
Champ in-the-making
Champ in-the-making
Brand new install on Ubuntu 12.04.  If I upload a document, the previewer renders the preview just fine.  If I then edit that document (XLS in this case) in Google Docs and save it back, then it is corrupted:


Caused by: org.alfresco.error.AlfrescoRuntimeException: 00220556 Unsuported transformation attempted: 
   reader: ContentAccessor[ contentUrl=store://2013/1/22/10/14/eed1f79e-1990-4823-8480-f7d6bc434de3.bin, mimetype=application/vnd.ms-excel, size=3861, encoding=UTF-8, locale=en_US]
   writer: ContentAccessor[ contentUrl=store:///opt/alfresco-4.2.c/tomcat/temp/Alfresco/FailoverTransformer_intermediate_ComplexContentTransformer_6883276389260716654.pdf, mimetype=application/pdf, size=0, encoding=UTF-8, locale=en_US]
   at org.alfresco.repo.content.transform.AbstractContentTransformer2.checkTransformable(AbstractContentTransformer2.java:176)
   at org.alfresco.repo.content.transform.AbstractContentTransformer2.transform(AbstractContentTransformer2.java:232)
   … 128 more


If I attempt to open it with LibreOffice or MS Office, I am informed that the document is corrupt and cannot be repaired, although it opens just fine with Google Docs subsequent to that.  The "budget.xls" in the sample web site design project exhibits this issue.
6 REPLIES 6

pneumatic
Champ in-the-making
Champ in-the-making
It appears that Google Docs upgraded the file format to xlsx but Alfresco does not update the file name.

pneumatic
Champ in-the-making
Champ in-the-making
It also appears that if you edit a cell within google docs and then leave the cursor within that cell, the changes are not committed.  If you then attempt to "Save to Alfresco", there will be a warning about unsaved changes.  If you attempt to go back to commit those changes, the document will freeze.

wabson
Star Contributor
Star Contributor
If the spreadsheet problem with unsaved changes in an active cell is an issue for you, then please add a comment to the JIRA issue here - https://issues.alfresco.com/jira/browse/GOOGLEDOCS-108. But note that this is hard to fix since active cells are also not saved by the Google editor as part of the current revision.

robm
Champ on-the-rise
Champ on-the-rise
I have also noticed that the iPad app seems unable to read a document (in my case a .doc file) once it has been edited in Google drive. This also happens with the official cloud implementation of Alfresco. It seems the Google docs functionality needs a bit more work before letting loose on paying users. I hope this receives some attention soon - its a really great feature.

It would be even nicer to be able to sync documents between google drive and Alfresco rather than just using Google drive as an online editing engine.

pmonks
Star Contributor
Star Contributor
@RobM, @pneumatic, the issue with both transformations and mobile devices is that Google may falsify information about MIME types when a document is retrieved back out of Google Drive via the APIs.  In short, the Google Drive APIs claim that a certain MIME type is supported, but when you request a document in that MIME type the Google APIs will happily succeed <em>but return the data in a different MIME type than the one that was requested, without any warning or indication that it's done so.</em>  Initially this didn't impact our Google Docs v2 integration, but recently (in the last 6 months or so) Google changed their supported MIME types, without also updating the responses from the API that reports what's supported vs what isn't, and that's what causes the symptoms you're seeing.

In detail, what's happening is:
<ol>
<li>Google tells us that it supports Word 97 as a supported MIME type for export</li>
<li>At the end of an editing session, we ask for the document from Google in Word 97 format</li>
<li>The Google API returns us the document successfully and tells us it's a Word 97 document, but the actual binary content that we get is in Word 2000 (.docx) format.</li>
<li>This then causes a chain reaction of failures in downstream processes (e.g. transformation, mobile, and almost certainly others) because Alfresco (mistakenly) continues to assert that the document is in Word 97 format, but the binary content silently morphed to Word 2000 format.</li>
</ol>This isn't limited to Word documents btw - similar problems exist for the other document formats (spreadsheets, presentations) supported by Google Docs.

We've been aware of these issues for some time (search the <a href="https://issues.alfresco.com/jira/browse/GOOGLEDOCS">GOOGLEDOCS JIRA project</a> for details), and we've been slowly but surely updating the Google Docs integration's code to be more suspicious of the MIME types reported by the Google APIs.  Some of that work surfaced in Google Docs v2.0.2 (the version currently running in the Alfresco Cloud), and more work has been put into this for the upcoming Google Docs v2.1 release (the version that will be included in Alfresco Enterprise 4.2).  Right now we're figuring out the best way to get an updated drop of the Google Docs v2 AMP available for Community installations too.  Stay tuned!

Oh, and if you're ever designing an API, <strong>don't follow Google's approach to MIME type handling!</strong>  APIs that lie are arguably worse than no API whatsoever!  😉

pacco_robin
Champ in-the-making
Champ in-the-making
Hi pmonks,

I am using version 4.2.e and I also have this problem. Any suggestions or news on this topic?

Kind regards,

Frank