Hello All,
let me introduce my self:
I am a .net developer and I’m zero in ColdFusion. working in he company that has a website in coldFusion.
They ask me to change the hosting.
The most difficault part of that is the new hosting is in NetWork Solution and it is cold Fuson 7.
But the current hosing is running under 8.
So
I encountered lots of errors regarding the version. I’ve done most of them but there is one that I don’t have any clue.
Here it is:
Element 1 is undefined in a Java object of type class coldfusion.runtime.Array referenced
It happens in most of the program when user click on Add button. for example here in CFLOOP :
<code>
<cftry>
<cfparam name=“url.startrow” default=“1”/>
<cfparam name=“url.maxrows” default=“10”/>
<cfset startRowParamUrl = ‘’>
<cfif StructKeyExists(url, “q”)>
<cfset startRowParamUrl =startRowParamUrl & ‘&q=#url.q#’>
</cfif>
<cfif StructKeyExists(url, “startrow”)>
<cfset startRowParamUrl =startRowParamUrl & ‘&startrow=#url.startrow#’>
</cfif>
<cfif StructKeyExists(url, “todeleteapproval”)>
<cfquery datasource=“ds”>
DELETE FROM CouponTempTbl Where Id in (url.todeleteapproval#)
</cfquery>
<cflocation url=“index.cfm?event=sitemanager&tabmenu=coupons” addtoken=“false”>
</cfif>
<cfif StructKeyExists(url, “todelete”)>
<cfquery datasource=“ds”>
UPDATE Coupon SET Deleted=1, BusinessId=0, CategoryId=0 Where Id in (url.todelete#)
</cfquery>
<cflocation url=“index.cfm?event=sitemanager&tabmenu=coupons” addtoken=“false”>
</cfif>
<cfif StructKeyExists(form, “SubmitUpdateCouponInfo”)>
<cfset tag_array = #SplitStr(form.BusinessByCategory,“_”)#>
<cfparam name=“businessId” default=“0”>
<cfparam name=“categoryId” default=“0”>
<cfloop from=“1” to=“#arrayLen(tagArray)#” index=“i”>
<cfif i EQ 1>
<cfset businessId= #tagArray[i]# />
<cfelseif i EQ 2>
<cfset categoryId= #tagArray[i]# />
</cfif>
</cfloop>
<cfquery datasource=“ds”>
UPDATE Coupon SET
CouponCode=‘#sqlSafe(form.CouponCode)#’
,Headline=‘#sqlSafe(form.Headline)#’
,Description=‘#sqlSafe(form.Description)#’
,CategoryId=#categoryId#
,BusinessId=#businessId#
,OwnerId=#form.OwnerId#
,Approved=#form.Approved#
,StartDate=‘#form.StartDate#’
,EndDate=‘#form.EndDate#’
Where Id=#form.CouponId#
</cfquery>
</code>
this code is countinued…
I don’t know how to get ride of it.
I think that it happens only in version 7.
if you need the whole code please let me know
if some one can help me I appreciate.
Thanks
bahar