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

Variable MESSAGECFID is undefined.

New Here ,
Jan 06, 2010 Jan 06, 2010

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?

297
Translate
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
LEGEND ,
Jan 06, 2010 Jan 06, 2010

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

Translate
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
LEGEND ,
Jan 06, 2010 Jan 06, 2010

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

Translate
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
New Here ,
Jan 06, 2010 Jan 06, 2010

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

Translate
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
LEGEND ,
Jan 06, 2010 Jan 06, 2010

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

Translate
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
New Here ,
Jan 06, 2010 Jan 06, 2010
LATEST

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

Translate
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