RE: [cfaussie] RE: Attribute validation error for tag cfoutput
OK. If it happens again and you want to debug it, and especially to catch it while the code is running in production, rather than doing the cfdump to the screen, put a test for isquery(queryname) before the CFOUTPUT LOOP, and if it's not a query, then do the CFDUMP but write it to a file (using the new OUTPUT attribute for CFDUMP, added in CF8), to see what is in that variable at that point. I'm not surprised that the error is coming and going. I suspect (and have from the beginning) that you have a situation where another thread is overwriting the variable. I appreciate that you might say, but the query is in the variables scope, so how could that happen? But let's not speculate. Let the diagnostics tell you what's going on. If the trap above springs, you'll see what CF thinks at that moment the variable is, and you may from that then recognize (or can search) where that may be being set, elsewhere in code. Hope that's helpful. /charlie From: cfaussie@googlegroups.com [mailto:cfaussie@googlegroups.com] On Behalf Of Scott Thornton Sent: Wednesday, February 01, 2012 12:32 AM To: cfaussie@googlegroups.com Subject: RE: [cfaussie] RE: Attribute validation error for tag cfoutput G'Day, the code original read: cfquery name=queryname select .. from . group by .. having .. /cfquery cfoutput query=queryname /cfoutput The error referred to cfoutput query=queryname The debug output was the generic query debug output you might see when debugging was turned on on the server, which gets displayed after the errors etc. eg SQL Queries queryname (Datasource=datasourcename, Time=62ms, Records=0) To test what was happening, I Used CFDUMP, eg: cfquery name=queryname select .. from . group by .. having .. /cfquery cfdump var=#queryname# cfoutput query=queryname /cfoutput and the error moved to the cfdump var=#queryname# The code is now running as expected though, I removed the CFLOOP and put back in CFOUTPUT and the error is no longer reproducable. It is as if nothing has happened at all and the page never had an error. No server restart required I might add. Thanks again. -- You received this message because you are subscribed to the Google Groups cfaussie group. To post to this group, send email to cfaussie@googlegroups.com. To unsubscribe from this group, send email to cfaussie+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/cfaussie?hl=en.
RE: [cfaussie] RE: Attribute validation error for tag cfoutput
Hmm. You're saying that a CFLOOP QUERY worked where a CFOUTPUT QUERY would not? That would indeed be curious. If you'd still needed to (or want to) solve the mystery, I would have suggested doing a CFDUMP of the variable, to see what it said it was. Assuming that when you ran it, you still got an error referring to it (next) in a CFOUTPUT QUERY, it would be very strange if the CFOUTPUT QUERY failed where the CFDUMP showed that it was indeed a query. Now, I press that point about making sure that the CFOUTPUT QUERY fails after the dump, because there is the possibility that it might work, which would suggest that there's some other time when it fails, and it's THEN that the CFDUMP would be most valuable. I could think of a number of scenarios where a variable might not have what it seems it should have. I won't take your collective time speculating. But if you do get the error and do get a dump, and it is a query, let us know what you find. Again, that's all if you want to press on. You may be happy to just leave it as a query loop. /charlie From: cfaussie@googlegroups.com [mailto:cfaussie@googlegroups.com] On Behalf Of Scott Thornton Sent: Monday, January 30, 2012 11:23 PM To: cfaussie@googlegroups.com Subject: [cfaussie] RE: Attribute validation error for tag cfoutput I changed my code to work within a cfloop ( which it should have been anyway ), and it works okay. -- You received this message because you are subscribed to the Google Groups cfaussie group. To post to this group, send email to cfaussie@googlegroups.com. To unsubscribe from this group, send email to cfaussie+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/cfaussie?hl=en. -- You received this message because you are subscribed to the Google Groups cfaussie group. To post to this group, send email to cfaussie@googlegroups.com. To unsubscribe from this group, send email to cfaussie+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/cfaussie?hl=en.
RE: [cfaussie] RE: Attribute validation error for tag cfoutput
Hi Charlie, Thanks as always for your continued support of the CFAussie forum. I always appreaciate your replies.. they include so much detail! I attempted to CFDUMP the query straight after the CFQUERY, and the attribute was not defined, which is very odd. Yes, I triple checked the name of the query, as I thought I must have made a mistake typing and ended up copy-and-pasting it :-) However I could defintly see that the query had executed and had returned 0 rows from the debug output displayed below the error text. Odder still, I cant get the error to occur again this morning, despite the query returning 0 rows still. I have put back in the cfoutput to try and see if it happens again. I really hope I can replicate it someday. Thanks again. From: cfaussie@googlegroups.com [mailto:cfaussie@googlegroups.com] On Behalf Of charlie arehart Sent: Wednesday, 1 February 2012 3:03 AM To: cfaussie@googlegroups.com Subject: RE: [cfaussie] RE: Attribute validation error for tag cfoutput Hmm. You’re saying that a CFLOOP QUERY worked where a CFOUTPUT QUERY would not? That would indeed be curious. If you’d still needed to (or want to) solve the mystery, I would have suggested doing a CFDUMP of the variable, to see what it said it was. Assuming that when you ran it, you still got an error referring to it (next) in a CFOUTPUT QUERY, it would be very strange if the CFOUTPUT QUERY failed where the CFDUMP showed that it was indeed a query. Now, I press that point about making sure that the CFOUTPUT QUERY fails after the dump, because there is the possibility that it might work, which would suggest that there’s some other time when it fails, and it’s THEN that the CFDUMP would be most valuable. I could think of a number of scenarios where a variable might not have what it seems it should have. I won’t take your collective time speculating. But if you do get the error and do get a dump, and it is a query, let us know what you find. Again, that’s all if you want to press on. You may be happy to just leave it as a query loop. /charlie From: cfaussie@googlegroups.com [mailto:cfaussie@googlegroups.com] On Behalf Of Scott Thornton Sent: Monday, January 30, 2012 11:23 PM To: cfaussie@googlegroups.com Subject: [cfaussie] RE: Attribute validation error for tag cfoutput I changed my code to work within a cfloop ( which it should have been anyway ), and it works okay. -- You received this message because you are subscribed to the Google Groups cfaussie group. To post to this group, send email to cfaussie@googlegroups.commailto:cfaussie@googlegroups.com. To unsubscribe from this group, send email to cfaussie+unsubscr...@googlegroups.commailto:cfaussie+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/cfaussie?hl=en. -- You received this message because you are subscribed to the Google Groups cfaussie group. To post to this group, send email to cfaussie@googlegroups.com. To unsubscribe from this group, send email to cfaussie+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/cfaussie?hl=en. -- You received this message because you are subscribed to the Google Groups cfaussie group. To post to this group, send email to cfaussie@googlegroups.com. To unsubscribe from this group, send email to cfaussie+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/cfaussie?hl=en.
RE: [cfaussie] RE: Attribute validation error for tag cfoutput
Thanks for the kind regards, Scott. (Though I know that not everyone likes all the detail I offer. It's an acquired taste!) So about your results below, I'm curious: are you saying that you also placed a CFOUTPUT loop following the CFDUMP and that *did not* get an error this time? It's just not clear, because you refer to the debug output displayed below the error text, but then you say I can't get the error to occur again. I press this point because it's critical (for what I was trying to confirm) that you do BOTH the CFDUMP and THEN the CFOUTPUT loop in the same request. If the dump worked but then the CFOUTPUT loop did not, it would be vital to confirm then what the dump showed. Again, I have a suspicion of something that could be happening, but let's the diagnostics tell us more before speculating. (Also, what version of CF are you running?) Finally, are you saying you're surprised that the query returned 0 records? That too is not clear. Of course, if a query had 0 records, a CFOUTPUT loop would not error but just do nothing, so I realize that's no the cause of your error. We just can't tell if you are surprised that it returned 0 records. /charlie From: cfaussie@googlegroups.com [mailto:cfaussie@googlegroups.com] On Behalf Of Scott Thornton Sent: Tuesday, January 31, 2012 4:27 PM To: cfaussie@googlegroups.com Subject: RE: [cfaussie] RE: Attribute validation error for tag cfoutput Hi Charlie, Thanks as always for your continued support of the CFAussie forum. I always appreaciate your replies.. they include so much detail! I attempted to CFDUMP the query straight after the CFQUERY, and the attribute was not defined, which is very odd. Yes, I triple checked the name of the query, as I thought I must have made a mistake typing and ended up copy-and-pasting it :-) However I could defintly see that the query had executed and had returned 0 rows from the debug output displayed below the error text. Odder still, I cant get the error to occur again this morning, despite the query returning 0 rows still. I have put back in the cfoutput to try and see if it happens again. I really hope I can replicate it someday. Thanks again. From: cfaussie@googlegroups.com [mailto:cfaussie@googlegroups.com] On Behalf Of charlie arehart Sent: Wednesday, 1 February 2012 3:03 AM To: cfaussie@googlegroups.com Subject: RE: [cfaussie] RE: Attribute validation error for tag cfoutput Hmm. You're saying that a CFLOOP QUERY worked where a CFOUTPUT QUERY would not? That would indeed be curious. If you'd still needed to (or want to) solve the mystery, I would have suggested doing a CFDUMP of the variable, to see what it said it was. Assuming that when you ran it, you still got an error referring to it (next) in a CFOUTPUT QUERY, it would be very strange if the CFOUTPUT QUERY failed where the CFDUMP showed that it was indeed a query. Now, I press that point about making sure that the CFOUTPUT QUERY fails after the dump, because there is the possibility that it might work, which would suggest that there's some other time when it fails, and it's THEN that the CFDUMP would be most valuable. I could think of a number of scenarios where a variable might not have what it seems it should have. I won't take your collective time speculating. But if you do get the error and do get a dump, and it is a query, let us know what you find. Again, that's all if you want to press on. You may be happy to just leave it as a query loop. /charlie From: cfaussie@googlegroups.com [mailto:cfaussie@googlegroups.com] On Behalf Of Scott Thornton Sent: Monday, January 30, 2012 11:23 PM To: cfaussie@googlegroups.com Subject: [cfaussie] RE: Attribute validation error for tag cfoutput I changed my code to work within a cfloop ( which it should have been anyway ), and it works okay. -- You received this message because you are subscribed to the Google Groups cfaussie group. To post to this group, send email to cfaussie@googlegroups.com. To unsubscribe from this group, send email to cfaussie+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/cfaussie?hl=en. -- You received this message because you are subscribed to the Google Groups cfaussie group. To post to this group, send email to cfaussie@googlegroups.com. To unsubscribe from this group, send email to cfaussie+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/cfaussie?hl=en. -- You received this message because you are subscribed to the Google Groups cfaussie group. To post to this group, send email to cfaussie@googlegroups.com. To unsubscribe from this group, send email to cfaussie+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/cfaussie?hl=en. -- You received this message because you are subscribed to the Google Groups cfaussie group. To post to this group, send email to cfaussie@googlegroups.com
RE: [cfaussie] RE: Attribute validation error for tag cfoutput
G'Day, the code original read: cfquery name=queryname select .. from … group by .. having .. /cfquery cfoutput query=queryname /cfoutput The error referred to cfoutput query=queryname The debug output was the generic query debug output you might see when debugging was turned on on the server, which gets displayed after the errors etc. eg SQL Queries queryname (Datasource=datasourcename, Time=62ms, Records=0) To test what was happening, I Used CFDUMP, eg: cfquery name=queryname select .. from … group by .. having .. /cfquery cfdump var=#queryname# cfoutput query=queryname /cfoutput and the error moved to the cfdump var=#queryname# The code is now running as expected though, I removed the CFLOOP and put back in CFOUTPUT and the error is no longer reproducable. It is as if nothing has happened at all and the page never had an error. No server restart required I might add. Thanks again. From: cfaussie@googlegroups.com [mailto:cfaussie@googlegroups.com] On Behalf Of charlie arehart Sent: Wednesday, 1 February 2012 3:53 PM To: cfaussie@googlegroups.com Subject: RE: [cfaussie] RE: Attribute validation error for tag cfoutput Thanks for the kind regards, Scott. (Though I know that not everyone likes all the “detail” I offer. It’s an acquired taste!) So about your results below, I’m curious: are you saying that you also placed a CFOUTPUT loop following the CFDUMP and that *did not* get an error this time? It’s just not clear, because you refer to “the debug output displayed below the error text”, but then you say “I can’t get the error to occur again”. I press this point because it’s critical (for what I was trying to confirm) that you do BOTH the CFDUMP and THEN the CFOUTPUT loop in the same request. If the dump worked but then the CFOUTPUT loop did not, it would be vital to confirm then what the dump showed. Again, I have a suspicion of something that could be happening, but let’s the diagnostics tell us more before speculating. (Also, what version of CF are you running?) Finally, are you saying you’re surprised that the query returned 0 records? That too is not clear. Of course, if a query had 0 records, a CFOUTPUT loop would not error but just do nothing, so I realize that’s no “the cause” of your error. We just can’t tell if you are surprised that it returned 0 records. /charlie From: cfaussie@googlegroups.com [mailto:cfaussie@googlegroups.com] On Behalf Of Scott Thornton Sent: Tuesday, January 31, 2012 4:27 PM To: cfaussie@googlegroups.com Subject: RE: [cfaussie] RE: Attribute validation error for tag cfoutput Hi Charlie, Thanks as always for your continued support of the CFAussie forum. I always appreaciate your replies.. they include so much detail! I attempted to CFDUMP the query straight after the CFQUERY, and the attribute was not defined, which is very odd. Yes, I triple checked the name of the query, as I thought I must have made a mistake typing and ended up copy-and-pasting it :-) However I could defintly see that the query had executed and had returned 0 rows from the debug output displayed below the error text. Odder still, I cant get the error to occur again this morning, despite the query returning 0 rows still. I have put back in the cfoutput to try and see if it happens again. I really hope I can replicate it someday. Thanks again. From: cfaussie@googlegroups.commailto:cfaussie@googlegroups.com [mailto:cfaussie@googlegroups.com] On Behalf Of charlie arehart Sent: Wednesday, 1 February 2012 3:03 AM To: cfaussie@googlegroups.commailto:cfaussie@googlegroups.com Subject: RE: [cfaussie] RE: Attribute validation error for tag cfoutput Hmm. You’re saying that a CFLOOP QUERY worked where a CFOUTPUT QUERY would not? That would indeed be curious. If you’d still needed to (or want to) solve the mystery, I would have suggested doing a CFDUMP of the variable, to see what it said it was. Assuming that when you ran it, you still got an error referring to it (next) in a CFOUTPUT QUERY, it would be very strange if the CFOUTPUT QUERY failed where the CFDUMP showed that it was indeed a query. Now, I press that point about making sure that the CFOUTPUT QUERY fails after the dump, because there is the possibility that it might work, which would suggest that there’s some other time when it fails, and it’s THEN that the CFDUMP would be most valuable. I could think of a number of scenarios where a variable might not have what it seems it should have. I won’t take your collective time speculating. But if you do get the error and do get a dump, and it is a query, let us know what you find. Again, that’s all if you want to press on. You may be happy to just leave it as a query loop. /charlie From: cfaussie@googlegroups.commailto:cfaussie@googlegroups.com [mailto:cfaussie@googlegroups.com] On Behalf Of Scott Thornton Sent: Monday, January 30, 2012 11:23 PM To: cfaussie@googlegroups.commailto:cfaussie@googlegroups.com Subject: [cfaussie] RE: Attribute