Re: imported template, error: String index out of range: 15020 near ?

JD_Nelson
Level 10 - Community Advisor

imported template, error: String index out of range: 15020 near ?

Eek - was hammering out an email template that was supposed to go out tomorrow (Sunday) - now I'm up against a wall becuase I'm getting an error when trying to approve or test send ... anyone get this before?  (the original template was downloaded from Litmus)

I'm getting the following error when attempting to send a sample email. An error occurred when procesing the email Rendered_Email_Velocity_Error_Area_?! String index out of range: 15020 near ?

4 REPLIES 4
Grégoire_Miche2
Level 10

Re: imported template, error: String index out of range: 15020 near ?

Hi JD,

Are you using a Velocity scrip token in your email ?

If so, try to remove it and reapprove and let us know whether the error remains.

-Greg

Josh_Hill13
Level 10 - Champion Alumni

Re: imported template, error: String index out of range: 15020 near ?

+1 on Greg.

You should never just drop an email template in there w/o reviewing the code. But the real issue is the Velocity Script that's being run on the Program level. Sounds like something's wrong there or it conflicted with the template code.

Also, providing the unique link to your template is 1) not a good idea and 2) doesn't help since we cannot see it. Best to post the code itself here or on github if you want feedback.

JD_Nelson
Level 10 - Community Advisor

Re: imported template, error: String index out of range: 15020 near ?

Thanks Josh - didn't notice that I had left the link in there - didn't mean to. Can you expand more on the 'velocity script that's being run at the program level' reference?

Grégoire_Miche2
Level 10

Re: imported template, error: String index out of range: 15020 near ?

Hi JD,

It means that there is a Velocity Scrip token in the program (either defined at program level or inherited from a folder) that raises that error when it runs.

-Greg