action trigger params - @ in params value causes it to fail to load

Bug #1745025 reported by Josh Stompro
This bug affects 1 person
Affects Status Importance Assigned to Milestone

Bug Description

EG 2.8

Hello, I think there is some sort of escaping failure when it comes to setting params that contain the @ symbol, such as email addresses.

I've often tried to set an action_trigger.event_param for the recipient_email param set to my email address for testing a specific event def. But it has never worked for me. I just realized that when I remove the @ character from the value then the params.recipient_address does work.

I don't see any notes in the docs that I'm supposed to be doing anything special with @ when I enter it. So I wonder if this is a bug in how params are loaded and stored in the environment?


Revision history for this message
Josh Stompro (u-launchpad-stompro-org) wrote :

So it looks like the value of params is run through the SAFE::reval() function, which seems to try to evaluate the value as perl code?

So if I enter the parameter value as '<email address hidden>' then it evaluates as a string and works fine. The single quotes are stripped off once the value gets to the TT processor.

So maybe this is just a documentation issue. There should be a section for Event Parameters that explains that the contents get evaluated as perl code. So if you want to pass a string that looks like perl code it needs to be in quotes. I would assume that something like 'currency_symbol' = $ would also fail unless it has quotes.

Does anyone use that feature for something cool?


Revision history for this message
Mike Rylander (mrylander) wrote :

I don't know about "cool", but I can confirm that it is intentional.

Revision history for this message
Josh Stompro (u-launchpad-stompro-org) wrote :

Mike, if you know of any examples of how it can be used in a useful manner please pass them on. I'm happy to try and add some documention on the params, but I cannot think of an example of using a perl code as the value that would be useful. Could you define a perl function as the value and then use it in your template like params.branchweblink(shortname)?

tags: added: actiontrigger documentation
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers