Welcome Guest, Not a member yet? Register   Sign In
Loading form_validation adds whitespace.
#1

[eluser]Bramme[/eluser]
Hey all

I think I've found a strange bug: When I load the form_validation library, an extra whitespace is added to my output...

I'll post some screenshots to explain...

I have no idea how this happens and I don't know CI's inner workings well enough to go snoop in the form_validation library, hunting for this thing. Anyone any idea?
#2

[eluser]Bramme[/eluser]
Okay, I'm absolutely clueless. It's not the form_validation library (sounded strange from teh beginning) but something else that's apparently outputting whitespace.

If you'll have a look at the file included, you'll see that it happens just above the h2 too.
Now I'm thinking it has something to do with Colin Williams' template library, since that h2 is the start of a new area.

Okay, I'm out of ideas: it only happens in Firefox and IE, it looks perfectly fine in Opera and Safari. What the hell is going on???
#3

[eluser]darkhouse[/eluser]
Maybe it's just a weird line break character in the template. Try deleting the gaps between <body> and <link> so it's just <body><link rel="... and see if the space still shows up.

Also, this likely has nothing to do with the issue, but do you have a reason for not having your css and javascript lines in the <head> ?
#4

[eluser]Bramme[/eluser]
Tried that, putting everything in the template on one line didn't solve the problem, sadly.

About the <head> tag: apparently firebug interprets it this way, my scripts and styles are however in between the <head> tags.
#5

[eluser]darkhouse[/eluser]
Oh weird about firebug. When you use the inspect tool in firebug, what element does it say has the gap?
#6

[eluser]Bramme[/eluser]
nothing, that's the weird thing. it's just a clean line, like you can see in the second post. I'm adding a testuser to the working online copy so you can see for yourself.

You can log in at http://208.64.71.104/handinhand/admin/ with "testuser" and "demo123". I'm getting a lot of "headers allready sent" errors though, I'll have to find a way to fix that, I'm not getting them locally (see other thread).

You can see the white lines in firebug here. Don't mind the errors for now, I'll try to fix those.
#7

[eluser]darkhouse[/eluser]
Do you have some whitespace on line 1 of models/mdl_content.php
#8

[eluser]Bramme[/eluser]
I have been opening up my files with various editors to see if I could spot anything out of the ordinary. I finally have. When I opened mdl_content.php with nano (on ubuntu server) I saw this in front of the opening <?php tag:
Code:


But I have no idea how it gets added. Could it be Dreamweaver?
#9

[eluser]darkhouse[/eluser]
I wouldn't know, I'm not a DW user - every time I've ever tried to use DW, something goes horribly wrong and I end up spending more time fixing things than doing actual development. I've found it's much easier to do everything with a straight text editor (if you're on windows, I use E (www.e-texteditor.com) it's like TextMate on the mac but has a few more features (like remote projects).

Good that you found it. What a weird issue.
#10

[eluser]Bramme[/eluser]
I've used E in the past, but it's not compatible with Vista 64 bit Sad it keeps crashing on me. Used it in the past and loved it.




Theme © iAndrew 2016 - Forum software by © MyBB