framework-one / fw1

FW/1 - Framework One - is a lightweight, convention over configuration, MVC application framework for ColdFusion / CFML.
http://framework-one.github.io
Other
374 stars 141 forks source link

PreserveKey is not passed when using fw.redirect with Lucee Modern local scope mode #522

Closed rodionbykov closed 3 years ago

rodionbykov commented 4 years ago

In function getNextPreserveKeyAndPurgeOld() variables nextPreserveKey and oldKeyToPurge will not be set if Lucee has 'Local Scope Mode' set to 'Modern'. In this case variables will be created inside closure Local scope, instead of caller function Local scope. This causes &fw1pk not be passed in URL and 'preserved' variables lost.

sebgmc commented 4 years ago

I've had similar issues - it baffled me for a long time and ended up working around it. Hopefully this can get fixed sometime soon.

tonyjunkes commented 4 years ago

I believe I have a working fix for this. At least with initial testing. Just need to do a little more scenario testing and make sure all supported engines are still happy. Probably have a PR ready by the weekend.

atuttle commented 3 years ago

It looks like this was fixed by #526 so this issue should be closed. Am I right?

DaveAndersonxx commented 7 months ago

I ran into this problem on Lucee 5.4.4.38 and fw/1 4.3. The Lucee setting for modern local scope handling didn't seem to have any impact on it. I resolved it by modifying the doController() method and adding a call to restoreFlashContext() right before the controller method is invoked.