Content Automation bug for multi-line properties ?

Hello,

It seems there is a bug in the Content Automation Webservice when I try to set multi-line values. The documentation says that we should use a \ at the end of each line. That's what I'm doing but it doesn't work : the new line character is removed. I watched the source code in org.nuxeo.ecm.automation.core.util.Properties and I think I've found the bug line 71 (should be prevLine + ā€œ\nā€ + line)

0 votes

1 answers

1927 views

ANSWER



Hi,

The '' character at the end of a line is not for inserting new lines, but for wrapping the text in multiple lines, to help you when editing a properties file (same behaviour than when using the java.util.Properties class). Unfortunately there is no way to escape special characters ('\n' for instance) like in the java properties files. But you can try using an alternative formatting supported by automation to control new lines inside your text:

<param type="properties" name="properties">
  <property key="dc:title">My Doc</property>
  <property key="dc:description">My Doc desc (try inserting your text formatting here)</property>
</param>
0 votes



Hi,

Thanks for the quick answer. Sorry, I've just noticed that the character antislash wasn't showing in my post. Ok I understand. But I'm using the content automation web service (with my own php client). I have to send params encoded in json so I can't use this xml syntax, can I ?

01/20/2012

Hi Julien, we are reviewing your problem internally to see if it rings a bell, but at the same time, why don't you try to use the nuxeo-automation-client (https://github.com/nuxeo/nuxeo-automation-php-client), or share your client if you think it is with better design/more complete ? indeed, the goal of those clients are to share the boring marshalling effort !
01/24/2012