Copy link to clipboard
Copied
Hi Everyone,
I developed a site long time ago in Coldfusion MX. I am trying Coldfusion 8 with 30 days trial. I am constantly getting an error message
"Variable MESSAGECFID is undefined. " on one of my file (attached : community.cfm) where I never use to got this message in MX server. Is it
something to do with my codes or do I have to set something in Coldfusion 8 server? I have used MS Acess database for this site. Can someone
please help me with this?
Copy link to clipboard
Copied
I presume the error is being thrown on line 90? It always helps if you post the full error msg to avoid questions like this.
Well... does messagecfid have a value? Clearly not (as far as CF can tell, anyhow). So you need to work out why.
Firstly, dump out the messages query just before you loop over it, and inspect what data it contains. Is it as you expect?
What happens if you change the reference to it to qualify it with the query name? Same error?
--
Adam
Copy link to clipboard
Copied
Oh, and that COUNTS query is only used for a count of the records... so why do you return them all? Just query for the count and return the single number. But this has nothing to do with your problem.
--
Adam
Copy link to clipboard
Copied
Hi Adam,
Thanks for the reply. I am at work at the moment and will try to look at line 90 when I get home. I think changing "where messagecfid = #messagecfid#"
to
"where messagecfid = #messages.messagecfid# " might resolve the problem.
I have attached a message as requested.
If you find anything else, please do let me know.
Thanks
Faizy
Copy link to clipboard
Copied
As per the error message: on your dev box, always have Robust Exception Handling enabled. This gives you a lot more info about the error.
--
Adam
Copy link to clipboard
Copied
Sorry, I will do this today in the evening and get back to you with more details tomorrow. Please check this post tomorrow again.
Thanks for your help.
Faizy