Page 1 of 1

Sites & Acrions problem after update

Posted: Mon Nov 04, 2013 12:11 pm
by Yuna
Hey ho,
i am new to OpenEMM and everything was working fine for 'ages' except of two errors after the update.
I am having a script action which is setting some variables for the pages like:
#set($features= $ScriptHelper.newHashMap())

$features.put(6,'General')
$features.put(25,'Price')
$features.put(29,'Region')
$features.put(26,"Taste")
$features.put(24,"Country")

$ScriptHelper.println("featuresSize: $features.size().toString()")
#set($s24d_info = $ScriptHelper.newHashMap())
[...]
The HashMap has values at the end but i am getting an error like:
Error in line 3, column 1: Invalid method $features.put().[]
Error in line 4, column 1: Invalid method $features.put().[]
Error in line 5, column 1: Invalid method $features.put().[]
Error in line 6, column 1: Invalid method $features.put().[]
Was there a change in the update for?
I also tryed already all bugfixes like replacemt "ExecuteScript.class" and so on.

And another thing is, that i cant create an receiver anymore. there is an error like
An error has occurred, at saving the receiver
Where can i see more details of this all?

Re: Sites & Acrions problem after update

Posted: Tue Nov 05, 2013 10:03 am
by maschoff
We had to notice that Velocity seems to have problems with hash maps. The put method returns an error, although all values are written correctly. The reason is, that the key is not set. Try using this different notation:

Code: Select all

#set($features = $ScriptHelper.newHashMap())

#set($features.6 = General")
#set($features.25 = Price")
#set($features.29 = Region")
#set($features.26 = Taste")
#set($features.24 = Country")
Your second error report is to generic for us to investigate.

Re: Sites & Acrions problem after update

Posted: Fri Jan 31, 2014 9:33 am
by reeta
Thank you for the fix. It seems to work now.