Forum Moderators: phranque

Message Too Old, No Replies

Sharing the pain

         

csdude55

9:30 pm on Mar 30, 2017 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



I know a lot (if not most) of you guys can relate to this, so I'm sharing my story in the hopes of making you guys feel better... or at least laugh at my pain.

So I've been working on a PHP that opens via Ajax, and then there's a form. When the user submits the form it processes the same PHP script, and then shows the results in the same Ajax DIV element. It's a little complicated since it's hard to debug a script that's opened in Ajax, but not too bad.

At around 10pm last night, I thought it was finished. I filled out the form, clicked Submit, and... the entire page reloads! Worse, it didn't run the processing function and didn't show the results of the form.

So I worked on this thing until FIVE AM! I went over it with a fine-toothed comb, changing every Javascript method I could think of... I think I developed 6 different ways to process the same thing. But none of them worked at all!

I even gave up at one point and just rebuilt the whole thing from scratch, thinking there had to be a typo somewhere that I was overlooking. But nope, it still didn't work.

I was mad, and frustrated, my hair was sticking straight up from my constant running my hand through my hair. Then, right before going to bed... I saw it.

The name of the script I had written was "example_whatever.php". But the link I had typed in the <form> statement? "example-whatever.php"

That was it. SEVEN hours of working on the same supposedly simple script, and the WHOLE TIME the problem was that I had failed to hit the Shift key, and used a - instead of an _.

tangor

9:40 pm on Mar 30, 2017 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



This is what is called "face-palm coding". I'm happy to see I am not the only one guilty of this.

not2easy

9:49 pm on Mar 30, 2017 (gmt 0)

WebmasterWorld Administrator 10+ Year Member Top Contributors Of The Month



Or a typo in the css filename. Yeah. Been there. "why isn't this doing what it is supposed to?" :(

keyplyr

10:30 pm on Mar 30, 2017 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



I had failed to hit the Shift key, and used a - instead of an _
I solved that by no longer using "_" at all in file paths.

Using "_" in file paths & URLs was a short lived trend years ago because it looked nice in the browser's address bar; more like normal word separation. Then the all knowing Search Engines changed their parsing technique to use "-" as a keyword separator and to ignore "_" thus combining keywords to create jibberish as far as keyword value.

csdude55

5:29 am on Mar 31, 2017 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Using "_" in file paths & URLs was a short lived trend years ago because it looked nice in the browser's address bar; more like normal word separation. Then the all knowing Search Engines changed their parsing technique to use "-" as a keyword separator and to ignore "_" thus combining keywords to create jibberish as far as keyword value.


What the....?!?! Seriously, I didn't know the rules changed on me! Well, ain't that some crap. I guess that I just got set in my ways and thought that, no matter what else happened, at least I had that little problem solved.

Thanks for the tip :-)

keyplyr

5:33 am on Mar 31, 2017 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Well the good news on that is, keywords in general don't have much importance any longer, including file paths.