Home

Transform content bugs

You are here

6 posts / 0 new
Last post
Transform content bugs

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!

Quote:
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!

Quote:
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!

Quote:
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

Re: Transform content bugs

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

Mike

Re: Transform content bugs

No, the webscript works, i noticed Alfresco bugs...

Re: Transform content bugs

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)

Re: Transform content bugs

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

Re: Transform content bugs

I have this problem too.

But I think this feature must be included in transformDocument function