publishing problem

I am getting several errors in publishing
The all the publishing errors seem to be along this line

Unexpected exception while assembling one or more items: Problem when evaluating expression “$rx.cond.choose($variant_id == “832” , “Section_Head_News_Page_2010”, $rx.cond.choose($variant_id == “831” , “Section_Head_Page_2010”));” for variable “$sys.template”: Could not find method choose for object [com.percussion.services.assembly.jexl.PSCondUtils@3be46b] and arguments [true,Section_Head_Page_2010]

And the velocity log is
2009-12-11 10:29:19,640 - VM error : field_if_set. Null AST
2009-12-11 10:40:28,312 - VM error : field_if_set. Null AST
2009-12-11 10:40:29,734 - VM error : field_if_set. Null AST
2009-12-11 10:40:31,968 - VM error : field_if_set. Null AST
2009-12-11 10:40:49,796 - VM error : field_if_set. Null AST
2009-12-11 11:05:43,109 - Method generate threw exception for reference $rx in template vel_S_Image_with_Link at [1,18]
2009-12-11 11:05:43,171 - VM error : field_if_set. Null AST
2009-12-11 11:06:01,046 - VM error : field_if_set. Null AST
2009-12-11 11:06:03,468 - VM error : field_if_set. Null AST
2009-12-11 11:06:23,765 - VM error : field_if_set. Null AST
which i don’t think is going to help much

I have check all the settings I can think of and the templates are allowed for the site, though it could be easily something that i missed.

Hi Simon

Rather than using $rx.cond.choose just use if elseif statements.

Cheers
James

used this and it still errors

Unexpected exception while assembling one or more items: Problem when evaluating expression “<null>” for variable “$sys.template”: Problem parsing expression: if($variant_id == “832”) {“Section_Head_News_Page_2010”} else {“Section_Head_Page_2010”} at character 27

though a different error ??? might be a clue
</null>

Simon,

The error message you posted shows no space between the “if” and the opening paren of the conditional. Check the binding code to see if that space is missing there.

RLJII

Hi Simon

Try putting in semicolons:

if($variant_id == “832”) {“Section_Head_News_Page_2010”;} else {“Section_Head_Page_2010”;}

Cheers
James