cancel
Showing results for 
Search instead for 
Did you mean: 

Transform content bugs

louise
Champ in-the-making
Champ in-the-making
Alfresco Labs: Current version 3.0.0 (b 1164) schema 131 - Installed version 3.0.0 (b 1164) schema 131:

I'm working on a document and image transformation webscript (with JavaScript API) but i've got three troubles:

1. An unhandled DuplicateChildNodeNameException received when a target node name already exists, not just a null return!

Why? How can i handle this exception by webscript?

2. When a transformation error presents - transformDocument or transformImage returns with null - output node with new name already created, and contains the content of the source node!

Why? How can i receive the node id to remove?

3. Transformation requires an installed, and configured OpenOffice.org in Alfresco, but the relaunch of - an exited - OOo is not works, just avoid upcoming transformation processes!

Why? What is the main function of OpenOfficeConnectionTester if that does not reload OpenOffice service?

Source code of the content transform webscript for Alfresco: http://louise.hu/poet/?p=970
5 REPLIES 5

mikeh
Star Contributor
Star Contributor
It probably doesn't help that your transformed variable goes out of scope before you try to use it.

Mike

louise
Champ in-the-making
Champ in-the-making
No, the webscript works, i noticed Alfresco bugs…

ivo_costa
Champ in-the-making
Champ in-the-making
I've got to agree with Mike

your transformation variable goes out of scope…

in place of:
   var m = node.mimetype;
   if (m.substr(0, 5) == "image") {
      // transform an image
      var transformed = node.transformImage(args.mimetype, outputFolder);
   } else {
      // transform a document
      var transformed = node.transformDocument(args.mimetype, outputFolder);
   }

try
   var m = node.mimetype;
       var transformed = null;
   if (m.substr(0, 5) == "image") {
      // transform an image
      transformed = node.transformImage(args.mimetype, outputFolder);
   } else {
      // transform a document
      transformed = node.transformDocument(args.mimetype, outputFolder);
   }
it makes a lot of more sense

on the openoffice "issue" I can think of a lot of reasons why call back on soffice would be a mistake
for example: connection may be simply unavailable for a moment (busy… who knows?) calling on soffice again would only make soffice throw an erro, fill up more memory, make OS unstable (don't really know witch one)

ivo_costa
Champ in-the-making
Champ in-the-making
one thing I've got to agree

when a tranformation failed, in some cases alfresco still keept the target node as if it worked so if you don't know about the transformation problem the user will believe that it was a success… don't know if this was corrected althoug

for the exception… use a java backed webscript… a try…catch block can handle that problem

this little bug is no big deal… talking about a storm in a glass of water

serverok
Champ in-the-making
Champ in-the-making
I have this problem too.

But  I think this feature must be included in transformDocument function
Getting started

Tags


Find what you came for

We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.