Skip to main content
February 12, 2009
Question

CF 8 Stole my soul

  • February 12, 2009
  • 4 replies
  • 900 views
Hey guys,

Recently my company upgraded our dedicated server and we got cold fusion 8. Needless to say as a long time cf developer who harks back to the days of Allaire and cf studio, I was pretty excited. Not that Coldfusion mx 7 has not been good to me.

Well my excitement was short lived as I was soon to discover a glaringly unprofessional and mind boggling error. I am sure that you guys may already be aware of it.

When submitting a form to Coldfusion 8 (ver 8.0.1), you cannot have a blank name="" attribute in your input tags. Now I also know that it is very unprofessional to actually have a blank name="" attribute. But this was a submit button!

I mean COME ON. I lost hours of my life because of this. That kind of thing SHOULD NOT cause Coldfusion to throw a low level JAVA String index is out of range error. The thing could didn't even tell me a line number because it wasn't actually my code that was causing the error. It was improperly set out HTML for Pete's sake!

This has been the worst bug I have ever seen in Coldfusion. Oh and there have been some doozys.

So for anyone out there who is stepping through EACH AND EVERY LINE of their code trying to find this GHOST IN THE MACHINE. Here is a forum topic you can relate to.

DO NOT PUT BLANK NAME="" ATTRIBUTES IN YOUR SUBMIT BUTTONS.

PS: I still love Coldfusion even though it hurt me bad :)
PPS: Where can I lodge a complaint so that this get's fixed.
    This topic has been closed for replies.

    4 replies

    tclaremont
    Inspiring
    February 13, 2009
    As far as not being the place for complaining, we would not be doing you or the other readers of these forums any good if all we did is agree with each other.

    I am quite sure that eventually someone is going to do a web search on a similar problem and discover your post. That is a good thing. And I am quite sure that reader will be quite glad that you "complained".
    February 13, 2009
    quote:

    Originally posted by: tclaremont
    As far as not being the place for complaining, we would not be doing you or the other readers of these forums any good if all we did is agree with each other.

    I am quite sure that eventually someone is going to do a web search on a similar problem and discover your post. That is a good thing. And I am quite sure that reader will be quite glad that you "complained".


    Very well put tclaremont.

    I completely agree with what you're saying. And thank goodness for testing servers :)

    tclaremont
    Inspiring
    February 13, 2009
    I have often felt that the error messages from major software companies could be improved... until I started writing software. You cannot fathom the number of combinations that can contribute to whatever results in an error.

    My feeling is that your error message, while completely non constructive toward arriving at a solution, is so far into the minitory that it is likely statistically insignificant. Think about the number of times you have gotten a seemingly non-sensical error message with whatever other software you use on a daily basis. CF does pretty good if you have the appropriate error logging turned on. And of course, on your test server it should be turned on.

    Could it be better? Probably. Is it worth losing sleep over? I would say no. Thanks goodness for test servers, huh?
    Inspiring
    February 13, 2009
    CF-Pensioner wrote:
    > Hey guys,
    >
    > When submitting a form to Coldfusion 8 (ver 8.0.1), you cannot have a blank
    > name="" attribute in your input tags. Now I also know that it is very
    > unprofessional to actually have a blank name="" attribute. But this was a
    > submit button!

    I just tested with this simple form:
    <form action="test.cfm" method="get">
    <input type="text" name="">

    <input type="submit" name="" value="Submit GET">
    </form>



    <form action="test.cfm" method="post">
    <input type="text" name="">

    <input type="submit" name="" value="Submit POST">
    </form>

    and I don't get the error (CF 8,0,1,195765). Can you please provide a
    little more context so we can have a reproducible test case that can be
    submitted to Adobe for example ?

    > I mean COME ON. I lost 5 hours of my life because of this. That kind of thing
    > SHOULD NOT cause Coldfusion to throw a low level JAVA String index is out of
    > range error. The thing could didn't even tell me a line number because it
    > wasn't actually my code that was causing the error. It was improperly set out
    > HTML for Pete's sake!

    Indeed it should not cause an error.

    > This has been the worst bug I have ever seen in Coldfusion. Oh and there have
    > been some doozys.

    My guess is that there's something on your specific setup that causes
    this error

    > PPS: Where can I lodge a complaint so that this get's fixed.

    http://www.adobe.com/cfusion/mmform/index.cfm?name=wishform

    --
    Mack
    February 13, 2009
    I believe you are right Mack as I have run some test code outside of where I was previously getting the error and it does not occur.

    Alright my version of cf is (8,0,1,195765), and the java version is (1.6.0_04 ).

    I think that this problem ocurs when you submit a form to a remote function. I have not tested this but that is basically what is happening in my cms. It does this because of a framework I wrote quite a while back. I am planning on converting the cms to ColdBox but have not had the time yet.
    tclaremont
    Inspiring
    February 12, 2009
    I sense a slight over-reaction.

    I am not sure I would call this a bug or an error. If anything it was a weakness in the previous versions that has now been corrected.
    February 12, 2009
    I suppose you could be right about me overreacting, I have had a terrible past few weeks at work. Perhaps this was the straw that broke the camels back.

    However I do disagree that this is not a bug. Allowing your application to fail Catastrophically due to faulty user input is not acceptable.

    You should present the user with a message more like.

    Form attributes incomplete. One or more of your form fields has an incorrect/incomplete attribute. Coldfusion will not process forms with incorrect/incomplete syntax.

    The error message I got was completely indecipherable. It sad this.

    Error: String index out of range 0

    No line numbers no useful feedback, nothing.
    Participating Frequently
    February 12, 2009
    I agree you're overreacting. Where you should be placing blame is on the coder that put a blank name="" attribute in his/her code. Either put a name, or don't put a name, but don't put a blank name. That's just bad coding. It doesn't make sense to have a blank attribute. Ever. Either set it to something, or don't set it at all.

    According to the HTML spec, name is an optional attribute of the submit input type, so you should be able to get away with not setting it. It basically doesn't contribute anything to the form submission if not set, it just submits the form.
    http://www.rfc-editor.org/rfc/rfc1866.txt