I've just come up against what seems like an undocumented variable issue
with CFMX, thought I'd share it with y'all.

A tag for validating URLs from form input broke in MX, and has never broken
before in other versions of CF. In in, there is a list of variable
declarations that set booleans according to the protocol in the form field
value:

http = Left(fieldValue, 7) EQ "http://";;
https = Left(fieldValue, 8) EQ "https://";;
ftp = Left(fieldValue, 6) EQ "ftp://";;
gopher = Left(fieldValue, 9) EQ "gopher://";;
telnet = Left(fieldValue, 9) EQ "telnet://";;
nntp = Left(fieldValue, 7) EQ "nntp://";;
wais = Left(fieldValue, 7) EQ "wais://";;

This code generated an exception with this message:

"cannot convert the value of type class coldfusion.runtime.CgiScope to a
boolean"

I went spare trying to figure this one out until a friend suggested that
http, wais, ftp, etc. might now be reserved words. Sure enough, this code:

IsHTTP = Left(fieldValue, 7) EQ "http://";;
IsHTTPS = Left(fieldValue, 8) EQ "https://";;
IsFTP = Left(fieldValue, 6) EQ "ftp://";;
IsGOPHER = Left(fieldValue, 9) EQ "gopher://";;
IsTELNET = Left(fieldValue, 9) EQ "telnet://";;
IsNNTP = Left(fieldValue, 7) EQ "nntp://";;
IsWAIS = Left(fieldValue, 7) EQ "wais://";;

works fine. So don't use URL protocols as variable names with MX!!

Is there a community log of any sort for undocumented MX bugs? Would be nice
to have ONE place to go to to check and report stuff... MM LiveDocs?

The other issue is: for all my apps, I use dot notation in URL vars, e.g.
http://localhost/index.cfm?action=content.view&ID=23

Everything *seems* to work on MX, but I'm just wondering about how
URL.action - with that bit of "plain" dot notation (i.e. no structure
implied) - stands now with MX not supporting this sort of non-structure dot
notation? Could there be any problems with this?

thanks,

- Gyrus

~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- [EMAIL PROTECTED]
work: http://www.tengai.co.uk
play: http://www.norlonto.net
- PGP key available
~~~~~~~~~~~~~~~~~~~~~~~~~~~~

______________________________________________________________________
Your ad could be here. Monies from ads go to support these lists and provide more 
resources for the community. http://www.fusionauthority.com/ads.cfm
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to