Details
-
Bug
-
Status: Closed
-
Normal
-
Resolution: Fixed
-
2.24.12
-
None
-
None
Description
On a hippostd:templatequery node you can add a hippostd:modify multivalued property that the FolderWorkflow uses to calculate values for properties when creating a new document. It is possible to define values for multivalued properties. You can for example mention the property twice, and supply two variables that will lead to two calculated values. The code takes into account that a calculation can not lead to a result. In the case of two values where the first calculation does not lead to a result, after calculation of the second value the NPE occurs.
Example: you have a hippostd:templatequery for a document that has a multivalued property defaultcontent:date. You try to give it two values this way:
<sv:property sv:multiple="true" sv:name="hippostd:modify" sv:type="String">
[...snip...]
<sv:value>./defaultcontent:date</sv:value>
<sv:value>$date</sv:value>
<sv:value>./defaultcontent:date</sv:value>
<sv:value>$now</sv:value>
</sv:property>
When the $date results in no value (null is stored), a NPE occurs when trying to store the value that results fromt $now.