Skip to main content
Participant
October 9, 2009
Question

Complex object types cannot be converted to simple values

  • October 9, 2009
  • 1 reply
  • 1434 views

Hi,

I haven't used ColdFusion in some time, and the issue at hand is moving very old ColdFusion code to a new server.

In this chunk below, the error seems to be happening on the line <CFIF ISDEFINED("Login")>

Hopefully someone can point me in the right direction or give me a tip on how to fix this outdated code.

It seems I need to change the simple value to a complex one, or something like that.

Pardon my lack of knowledge

Thanks in advance!

<CFLOCK TIMEOUT="30" THROWONTIMEOUT="Yes" NAME="#Session.SessionID#" TYPE="ReadOnly">
<CFIF NOT ISDEFINED("Session.Started")>
  <CFSET LOGIN = "">
</CFIF>
</CFLOCK>

<cfinclude template="top.inc">

<CFIF ISDEFINED("Login")>
<CFINCLUDE TEMPLATE="login.cfm">
        <cfinclude template="bottom.inc">
<CFABORT>
<CFELSE>
MORE CODE.......
</CFIF>

    This topic has been closed for replies.

    1 reply

    Inspiring
    October 9, 2009

    Right before that cfif tag, cfdump your login and see what it looks like.

    trwoodAuthor
    Participant
    October 9, 2009

    Thanks for the tip, Dan, that helped!

    But it turns out that the error was lurking in a seperate file, it was referencing a variable called 'file', which is a reserved word or scope or something.

    I guess that's an issue that comes up sometimes in really old code.

    If you know off the top of your head, do you know how to have the on-screen error display the file name and line number?

    Thanks

    Inspiring
    October 9, 2009

    Regarding,

    If you know off the top of your head, do you know how to have the on-screen error display the file name and line number?

    No, so I'll have to guess.  Enable robust debugging on your admin page.