-
Type:
Service Pack Request
-
Status: Closed
-
Resolution: Fixed
-
Affects Version/s: 3.1.2
-
Fix Version/s: 3.2.1
-
Component/s: ZZ_Archive
-
Labels:None
-
Bug Priority:
-
ACT Numbers:
15268, 16063
Using this webscript:
*********
testGetTitle();
function testGetTitle()
{ var uniquePath = args.uniquePath; model.avmNode = avm.lookupNode(uniquePath); }**
<testing>
<name>${avmNode.properties["cm:name"]}</name>
<title>${avmNode.properties["cm:title"]}</title>
</testing>
***********
You will get this error:
500 Internal Error An error inside the HTTP server which prevented it from fulfilling the request. Wrapped Exception (with status template): Error during processing of the template 'Error on line 4, column 14 in foo/testing/foo.title.get.xml.ftl Expecting a string, date or number here, Expression avmNode.properties["cm:title"] is instead a freemarker.template.SimpleHash'. Please contact your system administrator. org.alfresco.web.scripts.WebScriptException - Wrapped Exception (with status template): Error during processing of the template 'Error on line 4, column 14 in foo/testing/foo.title.get.xml.ftl Expecting a string, date or number here, Expression avmNode.properties["cm:title"] is instead a freemarker.template.SimpleHash'. Please contact your system administrator.
All works well if you remove the title reference and there is indeed a title property on this node.
This can be worked around by getting the title in the jscript first:
*************
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<testing>
<name>${name}</name>
<title>${title}</title>
</testing>
**
testGetTitle();
function testGetTitle()
************
- relates to
-
MNT-3927 Impossibility to upload file if Description (and Title) field is empty for document
- Closed