Page 1 of 2 12 Last
  • Jump to page:
    #1
  1. Wickedwd.com
    Devshed Newbie (0 - 499 posts)

    Join Date
    May 2004
    Location
    wickedwd.com
    Posts
    201
    Rep Power
    0

    Cf 7 Warning!!!!!!


    You may already know this but here it is just in case...

    in coldfusion 6 u could write if blah blah variable = "" the "" would equal nothing or blank and your programming would work
    NOT SO WITH cf 7

    in coldfusion 7 u have to write blah blah variable = " " the " " equals nothing or blank

    this seems stupid (and it is) but i just wasted 45 minutes on this crap thinking it was something else that was wrong.

    -Alas
  2. #2
  3. No Profile Picture
    Moderator

    Join Date
    Jun 2002
    Location
    Raleigh, NC
    Posts
    5,307
    Rep Power
    972
    Please don't post nonsense like this, because what you said is totally false. This code works perfectly under CFMX 7.0:

    <cfoutput>
    <cfset blankVar = "" />
    Length of the empty variable is: #len( blankVar )# (it will say 0)<br>
    </cfoutput>
  4. #3
  5. Wickedwd.com
    Devshed Newbie (0 - 499 posts)

    Join Date
    May 2004
    Location
    wickedwd.com
    Posts
    201
    Rep Power
    0
    CORRECTION

    1. What i said is TRUE! but only in Flash Forms srry for the mix up, i shouldve been more clear.

    2. Kiteless you've stayed behind, CF 7 has changed some stuff...keep up

    -Alas
  6. #4
  7. No Profile Picture
    Moderator

    Join Date
    Jun 2002
    Location
    Raleigh, NC
    Posts
    5,307
    Rep Power
    972
    Dude I know you think you're being cute or something, but you are just digging yourself deeper into a hole. I'm not sure where you are pulling this junk out of, but you're just plain wrong! This code runs correctly.

    <cfset blankVar = "" />
    <cfform name="form1" format="flash" width="500" height="400">
    <cfformgroup type="HBox">
    <cfformgroup type="VBox">
    <cfinput type="text" name="testBlank" value="">
    <cfinput type="text" name="testBlankVar" value="#blankVar#">
    <cfinput type="text" name="testBlankVarLen" value="#len( blankVar )#">
    <cfinput type="submit" name="submitBtn" value="Save Data">
    </cfformgroup>
    </cfformgroup>
    </cfform>


    A note to everyone, when you think you've found a bug in ColdFusion, the odds are actually about 99.9% that you've made a mistake.
  8. #5
  9. Wickedwd.com
    Devshed Newbie (0 - 499 posts)

    Join Date
    May 2004
    Location
    wickedwd.com
    Posts
    201
    Rep Power
    0

    Arrow


    Your script has nothing to do with what im talking about check this out

    If this is the form: (NOTICE that the option value of Choose one is set to "" and not to " ")

    Code:
    <cfform action="results.cfm" target="_top" format="flash" skin="haloblue" width="180">
    
    <cfformgroup type="panel" label="Search">
    
    <cfformgroup type="horizontal">
    <cfformitem type="text" style="text-align:left">Gender:</cfformitem>
    </cfformgroup>
    <cfselect width="112" name="Gender" style="text-align:left">
    <option value="">-Choose one-</option>
    <option value="1">Male</option>
    <option value="2">Female</option>
    </cfselect>
    
    <cfformgroup type="horizontal" style="text-align:center">
    <cfinput type="submit" name="submit" value="Submit">
    </cfformgroup>
    
    
    </cfformgroup>
    </cfform>
    Now write the results page:

    Code:
    <CFIF IsDefined("FORM.Gender")>
      <CFSET SESSION.bt.Gender = FORM.Gender>
    </CFIF>
    
    <CFQUERY NAME="Profilesearch" DATASOURCE="#Datasource#">
    SELECT * FROM Client
    WHERE 0=0
    <CFIF SESSION.bt.Gender IS NOT "">
        AND Gender = '#SESSION.bt.Gender#'
    </CFIF>
    ORDER BY ClientID
    </CFQUERY>
    
    Write a CFLOOP HERE
    And guess what it doesn't work, but if u replace "" with " " in the flash form it works.

    So um *cough* looks like this was the 0.01% percent chance of finding an error in CF u were talking about...getting a bit Rusty with old age Kiteless?

    PS. i think its about time this noob be getting that yellow belt
    Last edited by Alas; March 14th, 2005 at 10:33 AM.
  10. #6
  11. No Profile Picture
    Moderator

    Join Date
    Jun 2002
    Location
    Raleigh, NC
    Posts
    5,307
    Rep Power
    972
    Originally Posted by Alas
    Your script has nothing to do with what im talking about check this out
    Well if you would post a code example I wouldn't have to guess. Each of the examples I listed are 100% valid, it is you that is not being specific.

    Originally Posted by Alas
    in coldfusion 6 u could write if blah blah variable = "" the "" would equal nothing or blank and your programming would work
    is what you wrote and it is wrong.

    BUT, in this case you did indeed find a bug. I checked and it is a known bug that only affects a blank option value inside a cfselect. So pat yourself on the back, but not too hard because you're descriptive ability needs a lot of improvement. You started off with no code and a sweeping statement that you can't set a variable to a blank value in CFMX 7. The actual bug is that you can't have a blank value for an option tag inside a Flash cfselect form. Not only does that not have anything to do with using <cfset> or setting a variable, but it is an extremely specific situation. In the future save us both a bunch of trouble and post actual code so that I don't have to guess what you're talking about!
  12. #7
  13. Wickedwd.com
    Devshed Newbie (0 - 499 posts)

    Join Date
    May 2004
    Location
    wickedwd.com
    Posts
    201
    Rep Power
    0
    Yeah yeah, so where's my yellow belt? lol

    Comments on this post

    • kiteless agrees : Found a CF bug
  14. #8
  15. No Profile Picture
    Moderator

    Join Date
    Jun 2002
    Location
    Raleigh, NC
    Posts
    5,307
    Rep Power
    972
    You don't get it until 250 posts I think. But because you did find a bug I'll give you a reputation point.
  16. #9
  17. No Profile Picture
    Contributing User
    Devshed Novice (500 - 999 posts)

    Join Date
    Nov 2002
    Posts
    596
    Rep Power
    28
    Originally Posted by kiteless
    A note to everyone, when you think you've found a bug in ColdFusion, the odds are actually about 99.9% that you've made a mistake.
    You're joking right? Both the language and the server have a good few, some well known, some not, and many more serious than this - broken jdbc drivers that leak memory spring to mind. At my workplace we have 4 developers dedicated to keeping the thing running and we've got better things to do. mm owes me money and time
  18. #10
  19. No Profile Picture
    Moderator

    Join Date
    Jun 2002
    Location
    Raleigh, NC
    Posts
    5,307
    Rep Power
    972
    Certainly not joking. And a bug in a JDBC driver is not a CFMX bug, it is a JDBC driver bug. Macromedia doesn't write the JDBC drivers.

    The point is that people love to seem to jump to the conclusion that any time something is wrong and they've spent some time trying to solve it and can't, that it must be a bug. The reality is that there are only a relative few genuine bugs and most of them are very esoteric.

    We have several giant CF apps running and we certainly do not have a team of 4 full time people who spend all their time keeping things running. I hate to have to break this to you, but if your servers and applications require 4 full time people just to keep things running, you're doing something wrong.
  20. #11
  21. No Profile Picture
    Contributing User
    Devshed Novice (500 - 999 posts)

    Join Date
    Nov 2002
    Posts
    596
    Rep Power
    28
    well, I take your point about looking for a solution first and I admit my little rant is more about cfmx server than the language so a bit OT. But I do think cfmx server is a leaky, unpredictable product & if I had a choice I'd drop it like a hot brick. We are running high profile transactional sites, we get it in the neck when they're down and currently jrun is running up to 100% cpu about once a day. Yes, I've read everything there is to read on this @ mm, we have service calls open with them etc etc (altho if you have any suggestions, pipe up!) and have 10 or so years experience with cf between us at a guess. I also use Tomcat/struts and have had no problems...
  22. #12
  23. No Profile Picture
    Moderator

    Join Date
    Jun 2002
    Location
    Raleigh, NC
    Posts
    5,307
    Rep Power
    972
    What does Macromedia support say? My guess would be that if you have things set up and tuned correctly, and have the latest CFMX and JRun patches installed, that if you are still having problems it is somewhere in the code (or the SQL).
  24. #13
  25. No Profile Picture
    Contributing User
    Devshed Novice (500 - 999 posts)

    Join Date
    Nov 2002
    Posts
    596
    Rep Power
    28
    Originally Posted by kiteless
    What does Macromedia support say? My guess would be that if you have things set up and tuned correctly, and have the latest CFMX and JRun patches installed, that if you are still having problems it is somewhere in the code (or the SQL).
    yes, you're probably right - macromedia are currently out of suggestions apart from a site visit
  26. #14
  27. No Profile Picture
    Moderator

    Join Date
    Jun 2002
    Location
    Raleigh, NC
    Posts
    5,307
    Rep Power
    972
    You might try load testing the app using something like the Microsoft Web Application Stress Testing Kit. It's free and it works very well. By blasting the server you may be able to track down the problem.

    Depending on the version you could also run into serious trouble with unlocked reads or especially writes to the session, application or server scopes. And then there are thread safety issues with CFC's, especially if you aren't var scoping any method-local variables. If things are really bad you might try having a third party do a code review (something like http://www.productivityenhancement.c...PeerReview.cfm )
  28. #15
  29. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    May 2004
    Posts
    377
    Rep Power
    0
    hmm, i found a buggy bug about CFMX 6.1 too. But nobody gave me any golden globe appreciation points

    datediff function forgets 1 day between 1870 and 1871.
    i know not related to the post but thought i should mention.

    when is the best time to start using CFMX 7 ?
Page 1 of 2 12 Last
  • Jump to page:

IMN logo majestic logo threadwatch logo seochat tools logo