Copy link to clipboard
Copied
After migration from CF8 to CF11, my users cannot save the application and continue at later time. The application still work fine under CF8. The application uses the registry to store the values. I have
Your application has been saved. Click here to continue your application now.
To return to your application at a later time, simply re-visit the Pool Discharge Permit link you used to get to this application. Or you can add this page to your "Favorites" list.
(Please note: returning to a saved application only works if you are on the same computer.)
You can also print your application in its current state for mailing or faxing. Click here to print.
Thanks
Copy link to clipboard
Copied
Could you show us the part of the code that you are having difficulty with?
Copy link to clipboard
Copied
I am not getting any errors, when you click the SaveForLater button, but when you return to the page, it is not showing the correct page. The page should acknowlege that there is a saved application, Click Yes to continue the previous application or No to start a new application.
<cfparam name="client.poolDischarge" default="">
<cfparam name="m" default="checkClient">
<cfparam name="v" default="">
<cfswitch expression="#m#">
<cfcase value="checkClient">
<cfif v eq "" and len(client.pooldischarge)>
<cfset v = "hasClient">
<cfelse>
<cfset v = "apply">
</cfif>
</cfcase>
<cfcase value="clear">
<cfset client.poolDischarge = "">
<cfset v = "apply">
</cfcase>
<cfcase value="print">
<cfset currentApplication = application.poolDischarge.createApplication(argumentCollection = form)>
<cfset application.poolDischarge.saveApplication(currentApplication)>
<cfset v = "print">
</cfcase>
<cfcase value="save">
<cfset currentApplication = application.poolDischarge.createApplication(argumentCollection = form)>
<cfset application.poolDischarge.saveApplication(currentApplication)>
<cfset v = "saved">
</cfcase>
<cfcase value="validateAddress">
<cfset currentApplication = application.poolDischarge.createApplication(argumentCollection = form)>
<cfset application.poolDischarge.saveApplication(currentApplication)>
<cfset v = "validating">
</cfcase>
<cfcase value="validateAddressRetry">
<cfset currentApplication = application.poolDischarge.getSavedApplication()>
<cfset currentApplication.Discharge_Address_Entered = form.Discharge_Address_Entered>
<cfset currentApplication.Discharge_Address_Number = "">
<cfset currentApplication.Discharge_Address_Street_Name = "">
<cfset currentApplication.Discharge_Address2 = form.Discharge_Address2>
<cfset currentApplication.Discharge_City = form.Discharge_City>
<cfset currentApplication.Discharge_State = form.Discharge_State>
<cfset currentApplication.Discharge_Zip = form.Discharge_Zip>
<cfset application.poolDischarge.saveApplication(currentApplication)>
<cfset v = "validating">
</cfcase>
<cfcase value="submitApplication">
<cfset currentApplication = application.poolDischarge.getSavedApplication()>
<cfset currentApplication.Discharge_Address_Number = form.Discharge_Address_Number>
<cfset currentApplication.Discharge_Address_Street_Name = form.Discharge_Address_Street_Name>
<cfif currentApplication.Pro_Discharge eq 1 and currentApplication.Maintenance_Company_ID eq -1>
<!--- Create a new one --->
<cfset currentApplication.Maintenance_Company_ID = application.poolDischarge.insertMaintenanceCompany(argumentCollection = currentApplication)>
</cfif>
<cfset application.poolDischarge.insertApplication(argumentCollection = currentApplication)>
<cfset application.poolDischarge.sendNewApplicationEmail()>
<cfset client.poolDischarge = "">
<cflocation url="?v=thankyou&m=0" addtoken="No">
</cfcase>
</cfswitch>
<cfoutput>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<title>CCCSD Pool Discharge Application</title>
<link href="common/base.css" rel="stylesheet" type="text/css">
<script src="common/scripts.js" type="text/javascript"></script>
<script src="common/extendedDate.js" type="text/javascript"></script>
<script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=false"></script>
</head>
<cfparam name="onloadProcs" default="">
<body onLoad="doLoadProc();#onloadProcs#">
<center>
<div id="logoBar"><div class="logoBox"><img src="common/images/logo.gif" width="401" height="88" alt="" border="0"></div></div>
<div id="contentArea">
<h1>Pool Discharge Permit Application</h1>
<cfswitch expression="#v#">
<cfcase value="hasClient">
<p>We have found an application in progress. Would you like to resume the previous application?</p>
<p>
<a href="?v=apply">Yes. Continue my previous application.</a><br>
<a href="?m=clear">No. I'd like to start a new application.</a>
</p>
</cfcase>
<cfcase value="saved">
<script type="text/javascript">
<!--
doPrint = function() {
document.getElementById("printFrame").src = "print.cfm";
}
//-->
</script>
<p>Your application has been saved. <a href="?v=apply">Click here</a> to continue your application now.</p>
<p>
To return to your application at a later time, simply re-visit the <a href="#script_name#">Pool Discharge Permit</a> link you used to get to this application. Or you can add this page to your "Favorites" list.<br>
(Please note: returning to a saved application only works if you are on the same computer.)
</p>
<p>You can also print your application in its current state for mailing or faxing. <a href="" onclick="doPrint(); return false;">Click here to print</a>.</p>
<iframe id="printFrame" width="695" height="1" frameborder="0" name="printFrame"></iframe>
</cfcase>
<cfcase value="apply">
<cfinclude template="interfaces/application-form.cfm">
</cfcase>
<cfcase value="validating">
<cfinclude template="interfaces/validate-address.cfm">
</cfcase>
<cfcase value="thankyou">
<p>Thank you. Your application has been received and will be reviewed within 72 hours.</p>
<p>Do you need to request another Pool Discharge Permit? <a href="?v=apply">Submit a new application.</a></p>
</cfcase>
</cfswitch>
</div>
</center>
</body>
</html>
</cfoutput>
Copy link to clipboard
Copied
Imran Chaudhary_857 wrote:
I am not getting any errors, when you click the SaveForLater button, but when you return to the page, it is not showing the correct page. The page should
acknowlege that there is a saved application,
Click Yes to continue the previous application or
No to start a new application.
The case you describe is missing from the code you have provided. The two cases in the code that come close to your description are:
<cfcase value="hasClient">
<p>We have found an application in progress. Would you like to resume the previous application?</p>
<p>
<a href="?v=apply">Yes. Continue my previous application.</a><br>
<a href="?m=clear">No. I'd like to start a new application.</a>
</p>
</cfcase>
<cfcase value="saved">
<p>Your application has been saved. <a href="?v=apply">Click here</a> to continue your application now.</p>
<p>
To return to your application at a later time, simply re-visit the <a href="#script_name#">Pool Discharge Permit</a> link you used to get to this application. Or you can add this page to your "Favorites" list.<br>
(Please note: returning to a saved application only works if you are on the same computer.)
</p>
</cfcase>
Copy link to clipboard
Copied
Those are the correct cases that you mentioned. These cases work when I use the Coldfusion 8, but not in Coldfusion 11. Also I am using IIS 8.5
<cfcase value="hasClient">
<p>We have found an application in progress. Would you like to resume the previous application?</p>
<p>
<a href="?v=apply">Yes. Continue my previous application.</a><br>
<a href="?m=clear">No. I'd like to start a new application.</a>
</p>
</cfcase>
<cfcase value="saved">
<p>Your application has been saved. <a href="?v=apply">Click here</a> to continue your application now.</p>
<p>
To return to your application at a later time, simply re-visit the <a href="#script_name#">Pool Discharge Permit</a> link you used to get to this application. Or you can add this page to your "Favorites" list.<br>
(Please note: returning to a saved application only works if you are on the same computer.)
</p>
</cfcase>
Copy link to clipboard
Copied
Consider moving storage to a NoSQL datasource, database or file system as the registry is the worst possible place to store client data.
http://www.coldfusionmuse.com/index.cfm/2009/10/27/registry.bad.datasource.good
http://stackoverflow.com/questions/1228506/coldfusion-client-storage
http://www.dopefly.com/pages/coldfusionclientvariablesfinalnail.cfm
http://www.isummation.com/blog/strange-coldfusion-issue-jrun-eating-up-to-50-of-cpu/
Here's an undated quote from Adobe regarding ColdFusion MX 6/7:
ColdFusion MX 6.1 and MX 7: Troubleshooting client variable issues on Windows
There are many variations of hangs on production systems related to client variable use with the Windows Registry. The Windows Registry is not supported for production applications.