setNextEvent Persist issue in 3.1

Anyone having issues with persistance with 3.1? I have some existing code that I have migrated from 2.6 and this example isn’t working


I checked the cheatsheet and don’t see why it wouldn’t still work.



Works for me… I just implemented it like not 10minutes ago, can you show some more code as to why the variables before and the persist for nextevent and where you are using it.

first function
function addScores(event,rc)
if (event.getValue(“submit”, “”) eq “Add Score”)
Event.setValue(“header”, “Add Scores”);

if I do a writedump(rc); prior to the setNextEvent I can see all three vars that I am trying to perist.

if I do this in in the addgamescore function the only thing I get in the dump is the event. No persisted vars.

function addGameScore(event,rc)


I just created a simple text on another site and it works. Now my head is really itching.

You have a problem with your code, you are saying you want to persist tournamentID,gameid,eventID but you are not defining them anywhere.

So if I take it by your example, you might want to persist instead so it reads like this


or Even


RC should persist right across the board, so something else must be wrong.

Neither of those are working on this app. Strange. One difference between this app and my test app is that the one that isn’t working is using an SSL interceptor.

I’ve confirmed it’s an issue with the ssl interceptor.

I am not using SSL on mine and this is what I do for messagebox

messageBox.setMessage(type=‘info’, message=‘Some message to display on failed form entry.’);
setNextEvent(event=‘general.redoyourform’, persist=“messageBox”);

Never had to do anything with RC though, but is there a reason you are doing setNextEVent() instead of just calling

addGameScore(event) I assume both methods are in the same handler?

Yes they are in same handler. I don’t know why I’m using it. Lack of experience I guess.

calling addGameScore(event) like doesn’t work. Can I use setview inside a function call like that?

You might need to also pass rc. prc as well, I am not using either but I noticed that you are using rc this way.

The only reason I do it is to save on a http request, but if you want the user to know what the URL is going to, then the way you are doing it is fine.

Just remember to pass the same arguments as your handler, so in your case you might have to do.

addGameScore(event, rc);

Once this is called then, ColdBOx treats it as if the handler was passed through the URL, which in this case actually wasn’t.

I do that and it works all the way to the setview. It still sets the view of original function.

My old SSL interceptor worked but I updated it to newest one in forgebox because it had been updated for SES.

Here are the two functions that I think may be causing the presist to fail when using this. Any input welcomed.

if ((!isSSLRequest()) && (isSSLRequired(event))) { redirect(event: event, useSSL:true, addToken: getProperty('addToken')); } else if ((isSSLRequest()) && (!isSSLRequired(event))) { redirect(event: event, useSSL:false, addToken: getProperty('addToken')); } var url = ""; var eventName = event.getCurrentEvent(); url = event.buildLink(linkto: eventName, ssl: useSSL);

I could be way of base here, but ColdFusion variables can’t persist over non SSL and SSL. They are in fact seen as two different sessions.

Someone with some more knowledge can correct me here if I am wrong, but it will explain why you are having the issue.

I understand that. Both of these are SSL. It’s not a ssl to non-ssl scenario. It works no-ssl to no-ssl. Just not ssl to ssl.
I think somehow the interceptor is dropping it.

ok fixed it. What I realized what by not using the ssl=‘true’ option it was using not ssl then converting it back and thus loosing my perist variable because like you said it’s two different sessions. Thanks for giving me the thought.

kk, I couldn’t see anything in the code that cold be causing it. Admittedly I did browse it very quickly, sorry just don’t have the time to run any test cases to see it happening for myself.

Did you say that the older SSL interceptor actually worked? If that is the case any chance you can roll back or get a copy and do a compare on the two to see what differences there are?

Other than that I haven’t used the SSL intereceptor so I have no real suggestions there.