cancel
Showing results for 
Search instead for 
Did you mean: 

Strange preview problem with docs saved via SPP

jmcooper
Champ in-the-making
Champ in-the-making
Running Alfresco Community 3.4a with Ubuntu 10.04 64bit server.

Share is working fine and the document viewers are working fine when I upload files via the Upload function (word, pdf, etc)

But when I create or modify a document in MS Word 2003 via the SharePoint emulator interface there is no preview available ( " This document can't be previewed. " )

It seems like something is not getting run for doc functions across SharePoint ???

Note: If I download the document which can't be previewed via the Share Web I/F, no changes, and simply upload it via the Share Web I/F with a new name … all is good …

Thanks for any advice on what to check …

John
9 REPLIES 9

mikeh
Star Contributor
Star Contributor
First thing to check is that the mimetype is application/msword instead of application/octet-stream or anything else.

I seem to recall a recently-fixed bug in the SPP code around this area.

Thanks,
Mike

jmcooper
Champ in-the-making
Champ in-the-making
Thanks Mike.

Yes the MIME type is incorrectly set to "Octet Stream"

I don't have any control over that from the MS Word (SPP) level (I don't think). Manually editing via the Share I/F resolves, but … what's the best way to patch this?

Thanks,

John

mikeh
Star Contributor
Star Contributor
Here's the JIRA issue: https://issues.alfresco.com/jira/browse/ALF-5098

The suggested fix (to be confirmed) is:
org.alfresco.module.vti.web.actions.VtiIfHeaderAction-> doPut() should be changed: 

Old code:
———————————————————-
// updates changes on the server
try
{
     writer.putContent(req.getInputStream());
}
———————————————————

New code:

———————————————————-
// updates changes on the server
try
{
     String mimetype = mimetypeService.guessMimetype(documentName);
     writer.setMimetype(mimetype);
     writer.putContent(req.getInputStream());
}
———————————————————

Thanks,
Mike

jmcooper
Champ in-the-making
Champ in-the-making
Sorry Mike,

I haven't been able to verify this. I'm confused by where to find the code to change:

You said:
org.alfresco.module.vti.web.actions.VtiIfHeaderAction-> doPut()

I'm looking around here:
root@alf3:/opt# ls -l /opt/alfresco-3.4.a/tomcat/webapps/alfresco/WEB-INF/classes/alfresco/module/org.alfresco.module.vti
total 16
drwxr-xr-x 2 root root 4096 2010-10-27 14:15 context
-rw-r–r– 1 root root 1117 2010-10-27 14:03 modifications.install
-rw-r–r– 1 root root  262 2010-06-09 14:02 module-context.xml
-rw-r–r– 1 root root  278 2010-10-27 14:03 module.properties

Can you point me to something more specific ???

piski
Champ on-the-rise
Champ on-the-rise
Hi all,

Sorry to raise the post again but I have the issue with my fresh Alfresco 3.4.b installation …

When I upload the document, Share seems not to be able to generate the thumbnail and the preview (Store + Sites) of my doc file (Word2003).

I have checked the file Mimetype in file properties : "Type MIME: Microsoft Word". Moreover, the "Edit Online" option doesn't appear (only for Store, OK for Sites), which "sounds" it's related the same issue.

Can someone help us please ?
Thanks.

mikeh
Star Contributor
Star Contributor
Edit Online is not support outside of Sites, as the Sharepoint protocol relies on the idea of "sites" itself.

Thanks,
Mike

piski
Champ on-the-rise
Champ on-the-rise
Thanks Mike for your reply !

So, what's about the preview (and thumnails) issue ?

Have you heard (or raise in Jira) anything about this issue ? Mimetypes extraction issue or viewer bug ?

Thanks for your help

mikeh
Star Contributor
Star Contributor
Have you got all the support applications installed? i.e. OpenOffice, pdf2swf, ImageMagick? Check the startup log for warnings.

Thanks,
Mike

piski
Champ on-the-rise
Champ on-the-rise
You're probably right because the issue is reproduced against any document mimetype, not only for MSOffice documents.

I've checked my initial logs to find an error that I've missed but I'm still not enable to find nothing helpful … and finally, I've missed the most important !

Windows service "alfrescoOpenOffice" has not been installed (and I don't know why, if it's my fault or …)
Anyway, I've installed and run it and everything back to normal.

Thanks a lot for your great work (yours and Alfresco team) !