Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > Developer Center > anyone else getting non-existent errors reported by w3c validator

anyone else getting non-existent errors reported by w3c validator
Thread Tools
m a d r a
Mac Elite
Join Date: Sep 2001
Location: the intarweb
Status: Offline
Reply With Quote
Jan 12, 2006, 01:41 PM
 
after re-coding my website over the past couple of days, i've given it a routine run through the w3c validator and it keeps returning errors saying i've included "character data" in amongst the code of my document. the code is clean as a whistle in the original documents [i'm editing in BBedit with "show invisibles" turned on] but the verifier keeps reporting this same error - even tho' it's own display of the source code it has been validating doesn't show anything wrong either!


[click here to view error report]


anyone else having any trouble with the validator of late?
     
Simon Mundy
Grizzled Veteran
Join Date: Jun 2001
Location: Melbourne, Australia
Status: Offline
Reply With Quote
Jan 12, 2006, 06:26 PM
 
Have you tried 'Zap gremlins' from BBEdit (replacing them with bullet characters) to make sure there's nothing wrong. The characters you're seeing usually mean a UTF8 character has gone bad, so maybe there is a null character or some corrupt UTF8 data that 'Show invisibles' can't see.

Also maybe try re-encoding your page back to iso-8859-1 (just your homepage for now) and see if that fixes the problem?
Computer thez nohhh...
     
Oisín
Moderator Emeritus
Join Date: Mar 2004
Location: Copenhagen
Status: Offline
Reply With Quote
Jan 13, 2006, 07:45 AM
 
Or just try deleting the whole two lines there and rewrite them? That should, in any case, get rid of this seemingly rogue character...
     
m a d r a  (op)
Mac Elite
Join Date: Sep 2001
Location: the intarweb
Status: Offline
Reply With Quote
Jan 13, 2006, 08:26 AM
 
i thought i'd sussed it there - i ran "zap gremlins" on the header file and various included files and it found a non-character in one of the files - but unfortch i'm still getting the same error with the validator.

thanks for the "zap gremlins" tip anyway. i always wondered what that was for!

i've also deleted everything between the two lines and then put in a fresh space and the error happened again. it's really annoying, as i got all the difficult stuff like popup window links and my PHP generated code to validate as XHTML 1,1 strict, but i'm failing the validation on some random character which disnae even seem to exist!

come to think of it, i had a problem like this with bbedit before, one time. that time when i opened the same file in subethaedit, the corrupt character showed up straight away as an upside down question mark - but this time subethaedit cannae see anything there either.
     
ism
Grizzled Veteran
Join Date: Sep 2001
Status: Offline
Reply With Quote
Jan 13, 2006, 08:45 AM
 
Is it a dodgy line break?

Could try normalise line endings. Or re-opening with/without translating line breaks.

Does it look weird with Show Invisibles on?

What are you document settings? Unix line breaks & Unicode (UTF-8 no BOM)?
     
m a d r a  (op)
Mac Elite
Join Date: Sep 2001
Location: the intarweb
Status: Offline
Reply With Quote
Jan 13, 2006, 09:15 AM
 
it looks fine with "show invisibles on" and yep - the document settings are as you say. i'm wondering if it's some kind of PHP glitch. the page [index.php] includes the header.php file, which in turn [between its "<head>" tags includes three further files; metatags.php [all the site metatags] javascript.js [site js] and miscfunctions.php [as the name suggests, misc PHP functions]. mind you, as i said before, i've checked all the included files as well and there are no "gremlins" [and no linebreaks after the final PHP code closing tag]. i'll try "normalise line endings" and see if that works.
     
ism
Grizzled Veteran
Join Date: Sep 2001
Status: Offline
Reply With Quote
Jan 13, 2006, 09:51 AM
 
Originally Posted by m a d r a
i'm wondering if it's some kind of PHP glitch.
Couldn't you try validating the local bbedit template to check this?
     
tooki
Admin Emeritus
Join Date: Oct 1999
Location: Zurich, Switzerland
Status: Offline
Reply With Quote
Jan 13, 2006, 07:22 PM
 
I cut and pasted the page source into a new TextWrangler file, set it to UTF-8, and saved it to a new file. I then uploaded that file straight up to the validator, and it passed.

Perhaps the file is just mildly corrupted? Just cut and paste into a fresh file and replace the old one.

tooki
     
   
 
Forum Links
Forum Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Top
Privacy Policy
All times are GMT -4. The time now is 11:03 PM.
All contents of these forums © 1995-2017 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.8 © 2000-2017, Jelsoft Enterprises Ltd.,