Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
0

Upgrade to CF10 and App is Broken

Explorer ,
Jun 07, 2013 Jun 07, 2013

Copy link to clipboard

Copied

We are upgrading from CF8 to 10 and our major application a content management software is now broken. 

It uses Javascript, CF,  and XML. This code work perfect in CF 7, 8 and 9, but now in 10 we are screwed! I can provide more detail.

Trying to debug code in firebug.  The post looks like this

<methodCall>

<methodName>display.lock</methodName>

<params>

<param>

<value>

<string>9C7bd8c93CaCbc6A</string>

</value>

</param>

<param>
<value>
<string>mlongwell</string>

</value>

</param>

<param>
<value>
<string>31559-73666-19542</string>

</value>

</param>

</params>

</methodCall>

The error we are getting is below.

Webpage error details

User Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.1; WOW64; Trident/5.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; .NET4.0C; BRI/1; .NET4.0E; InfoPath.2)

Timestamp: Fri, 7 Jun 2013 19:52:51 UTC

Message: Unable to get value of the property 'nodeName': object is null or undefined

Line: 116

Char: 4

Code: 0

URI: http://test-coldfusion:84/wframework/js/wcWidget/wcXmlRpc.js

Views

932
Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
Jun 07, 2013 Jun 07, 2013

Copy link to clipboard

Copied

Search for 'nodeName' on your code base, then trace it where the nodeName gets its value.

Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Employee ,
Jun 07, 2013 Jun 07, 2013

Copy link to clipboard

Copied

Hello rcasdorph,

Along with the suggestion by p.sim, We would suggest you to use the Code Analyzer to check the custom codes http://help.adobe.com/en_US/ColdFusion/10.0/Developing/WSc3ff6d0ea77859461172e0811cbec0d04c-7fee.htm... , before you migrate your application. The architecture of ColdFusion changed from JRun(till ColdFusion 9) to Tomcat (ColdFusion 10). Thus, there are possibly many codes changes from ColdFusion 7/8 to ColdFusion 10.

Regards,

Anit Kumar

Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Jun 10, 2013 Jun 10, 2013

Copy link to clipboard

Copied

Thanks for the suggestion.  I ran it, but there are no specific errors. However, there are 240 pages that are using a local. var and that seems to have gone away in 10.

In ColdFusion9 LOCAL is a reserved word and built-in scope now. This means that Variables and structures should not be named as LOCAL. Naming a structure or array LOCAL may produce data discrepanies.

There is miles of code like this ...

{

65:                             for(local.i=1; local.i lte ArrayLen(_columns[arguments.column]); local.i++)

66:                             {

67:                                  local.module = StructNew();

68:                                  local.module.id = _columns[arguments.column][local.i];

Actually, 2500 instances of the local var.  I didn't write this. 

Do you have a suggestion for what to change that to? 

Or can I just change it to somethjng like _local?

Thanks for the help!

Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
Jun 10, 2013 Jun 10, 2013

Copy link to clipboard

Copied

As I understand, LOCAL scope is only available inside cffunction.

http://forta.com/blog/index.cfm/2009/6/21/The-New-ColdFusion-LOCAL-Scope

Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guide ,
Jun 10, 2013 Jun 10, 2013

Copy link to clipboard

Copied

LATEST

Your intinial post says you are upgrading from CF8 to CF10, but you say your code runs on CF9.  How do you know?  Have you tested it?

Did the error message in your second post come from the Code Analyzer for CF9?  Have you run the analyzer for CF10?

The LOCAL scope was introduced with CF9, so I would expect the same kind of issues with your application when run under either CF9 or CF10.  I don't think the functionality of the LOCAL scope changed between CF9 and CF10. The good news is that you shouldn't have to change all 2500 instances of "local"; you should only have to make changtes where it is being initially set as a variable or structure.  Look for places where local is being defined as a variable or structure, such as:

  • var local = {};
  • var local = "";
  • var local = StructNew();
  • <cfset local = StructNew()>
  • <cfset local = "">

Try commenting out those lines and see if code will then pass the analyzer without error.  If it does, then go back and remove them.

Code that places additional keys/values into LOCAL or variables initially defined using a VAR statement should continue to work (such as the code you cited in your second post).

-Carl V.

Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources