AnsweredAssumed Answered

4.2.e - Preview not fully fonctionnal

Question asked by vincent.ravier on Dec 26, 2013
Latest reply on Sep 9, 2014 by hello_wrold
Hi,

When trying to display a page about a specific pdf file, the preview cannot be rendered, with a message saying "The preview cannot be loaded from the server". However, previewing a simple pdf (self-generated file, only containing an image) works. The not-previewable pdf file is more complex, it contains a concert ticket with images and text.

So, I took a look at catalina.out, and it pointed out Alfresco cannot connect to OpenOffice server.
After some modifications to have LibreOffice server running (libreoffice script names libreoffice_ctl.sh instead of ctl.sh as refered to in alfresco.sh) and ImageMagick path setup in alfresco-global.properties, I get less errors in catalina.out.
There's still one thing I can't get rid of:
<blockcode>2013-12-26 09:03:44,206  ERROR [extensions.webscripts.AbstractRuntime] [http-apr-8080-exec-10] Exception from executeScript - redirecting to status template error: 11260006 Wrapped Exception (with status template): 11260299 Failed to execute script 'classpath*:alfresco/templates/webscripts/org/alfresco/repository/thumbnail/thumbnail.get.js': 11260298 Read-Write transaction started within read-only transaction</blockcode>

One of the only relevant (I think) information I've found so far is: https://issues.alfresco.com/jira/browse/MNT-7303
I'm not familiar with web scripts, I've just found a <b>thumbnail.get.desc.xml</b> containing:
<blockcode><webscript kind="org.alfresco.repository.content.stream">
  <shortname>Thumbnails</shortname>
  <description>
  Get a named thumbnail for a content resource.<br/>
  The two URL templates which support a 'filename' template-arg are made available in order to
  support scenarios (e.g. with third party libraries) where the repo URL being called includes an explicit filename suffix.<br/>
  Please note that Alfresco does not currently use the filename template-arg and that it will be ignored.
  Therefore a GET to these URLs will return the same resource as to the equivalent URLs without it.
  </description>
  <url>/api/node/{store_type}/{store_id}/{id}/content{property}/thumbnails/{thumbnailname}?c={queueforcecreate?}&amp;ph={placeholder?}&amp;lastModified={modified?}</url>
  <url>/api/node/{store_type}/{store_id}/{id}/content{property}/thumbnails/{thumbnailname}?c={queueforcecreate?}&amp;ph={placeholder?}</url> 
  <url>/api/path/{store_type}/{store_id}/{id}/content{property}/thumbnails/{thumbnailname}?c={queueforcecreate?}&amp;ph={placeholder?}</url>
  <url>/api/node/{store_type}/{store_id}/{id}/content{property}/thumbnails/{thumbnailname}/{filename}?c={queueforcecreate?}&amp;ph={placeholder?}</url> 
  <url>/api/path/{store_type}/{store_id}/{id}/content{property}/thumbnails/{thumbnailname}/{filename}?c={queueforcecreate?}&amp;ph={placeholder?}</url>
  <transaction allow="readonly">required</transaction>
  <format default="">argument</format>
  <authentication>user</authentication>
  <transaction>required</transaction>
</webscript></blockcode>

I'm just able to notice there's two transaction tags and… that's all. I don't really know what to do next to solve this error, and I don't even know if it will make preview working.
Apparently there's quite a lot of things about the preview, I've read about ImageMagick, JodConverter, LibreOffice, SWFTools… I'm a little bit lost, and understanding the stack involved when generating a preview is quite hard. There's no clear documentation about what is happening when. Also, are thumbnails and transformers somehow related?

Can someone clarify all this?

Outcomes