Description
By default velocity does not allow set to null. For example this script:
#if(!$a) * Variable a does not exist and this is normal #else * Variable a exist and this is not normal #end #set($a = "1") #if(!$a) * Variable a exist and this is normal #else * Variable a does not exist and this is not normal #end #set($a = $xwiki.null) #if(!$a) * Variable a does not exist and this is normal #else * Variable a exist and this is not normal #end
But apparently this can be fixed by adding this to velocity.properties (in xwiki 1.5 this will have to be done differently)
directive.set.null.allowed = true
Attachments
Issue Links
- blocks
-
XWIKI-4591 In a velocity macro, an optional parameter receives an old value even if left empty.
- Closed