SitePoint Sponsor

User Tag List

Results 1 to 18 of 18

Thread: non SGML errors

  1. #1
    100% Windoze-free earther's Avatar
    Join Date
    Feb 2003
    Location
    Linuxland
    Posts
    2,788
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    non SGML errors

    I'm working on a site here http://www.waterstonewildlife.org/journal/ When I try to validate I'm getting a slew of non SGML errors.

    I have no idea how to fix this as the code looks clean. Does anyone know what's going on?

    Mucho gracias.

  2. #2
    CSS & JS/DOM Adept bronze trophy
    Join Date
    Mar 2005
    Location
    USA
    Posts
    5,482
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Apparently WordPress is using some illegal characters.
    We miss you, Dan Schulz.
    Learn CSS. | X/HTML Validator | CSS validator
    Dynamic Site Solutions
    Code for Firefox, Chrome, Safari, & Opera, then add fixes for IE, not vice versa.

  3. #3
    100% Windoze-free earther's Avatar
    Join Date
    Feb 2003
    Location
    Linuxland
    Posts
    2,788
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Then why would they have a link for validation? Tidy validates the HTML in my text editor.

  4. #4
    SitePoint Wizard gold trophysilver trophybronze trophy dc dalton's Avatar
    Join Date
    Nov 2004
    Location
    Right behind you, watching, always watching.
    Posts
    5,431
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hey there lady! I took you page and pasted into an editor. Looks like you have some strange "hidden characters" in there and the validator is showing errors for "spaces" ... so much for wordpress's validation eh?

    They are probably using Unix tabs and line breaks and its writing "funny things" into the code. If you can ssh or telnet in look at in something like VI Editor (on the server) and see if anything looks rotten there.

    You do come up with some of the strangest errors dont you?

  5. #5
    100% Windoze-free earther's Avatar
    Join Date
    Feb 2003
    Location
    Linuxland
    Posts
    2,788
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I was hoping you'd come to the rescue, dc.

    I have never done ssh or telnet and am on XP so I'm going to have to find another way to fix it.

    Even though I do my editing in a text editor, I'm thinking it might be generated by something that I'm doing. Why aren't these characters getting stripped in the text editor? WHY MEEEEEE! :'(

    Always glad to oblige with an off-the-wall brain twister.

  6. #6
    SitePoint Author silver trophybronze trophy

    Join Date
    Nov 2004
    Location
    Ankh-Morpork
    Posts
    12,159
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    For some reason there are a whole bunch of ASCII NUL characters in there: one at each line feed.
    Birnam wood is come to Dunsinane

  7. #7
    SitePoint Wizard gold trophysilver trophybronze trophy dc dalton's Avatar
    Join Date
    Nov 2004
    Location
    Right behind you, watching, always watching.
    Posts
    5,431
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    * ducks into nearest phone booth to rip off suit and tie - yeah right, ME? suit and tie - OK *

    IF you have ssh access on your host you can download putty, thats what most people use now but I gotta warn you, its command line city once youre in! But hey, you are the one that wants to learn linux arent you?

    what text editor are you using?

    I grabbed your code and dropped it into editplus and then validated it and almost all the errors went away But then I noticed something weird in the source, it doesnt seem to be showing the whole pages code! Its stopping at this point:

    Code:
    </form>
    			</li>
    
    			<!-- Author information is disabled per default. Uncomment and fill in your details if you want to use it.
    BUT whats weird is that in FF (source code) that comment looks like this:

    -- Author information is disabled per default. Uncomment and fill in your details if you want to use it.

    notice no < at the beginning? BUT when I pasted it into editplus the < magically appeared! So I would start looking for something strange at that point, it might just be one goofy character... try pulling that whole comment out and see what happens.

    have fun! Beddy bye time for me ... I do the data import from hell today and Im BEAT!

  8. #8
    100% Windoze-free earther's Avatar
    Join Date
    Feb 2003
    Location
    Linuxland
    Posts
    2,788
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Another day, another round at it.

    First off, the evil characters are gone but it was not my doing. My friend, the server admin, did a search and replace without my even asking!

    But that does not answer the question of how they got there in the first place or how I can prevent it from happening again.

    I use NoteTab as my text editor. Have for years an always had my code validate.

    FF presents the entire html here but OMG the navigation isn't where it's supposed to be! Itwas working here a while ago so don't know what happened. If it's not one thing, it's another. *bawls*

  9. #9
    100% Windoze-free earther's Avatar
    Join Date
    Feb 2003
    Location
    Linuxland
    Posts
    2,788
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Update

    I just did a fresh download of WordPress and the characters are there
    just after I unzip the file. I noticed them before in Notepad but
    they were hidden in NoteTab.

    But here's the kicker . . . I just checked out a test installation I
    did on another server. It validates perfectly with the evil
    characters.
    http://validator.w3.org/check?uri=ht...esigns.com%2Fj
    ournal%2F So this makes me think it's a server configuration. Does
    that sound logical?

  10. #10
    SitePoint Wizard gold trophysilver trophybronze trophy dc dalton's Avatar
    Join Date
    Nov 2004
    Location
    Right behind you, watching, always watching.
    Posts
    5,431
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    is there any difference between the two servers? Like one windows, one Linux ... it does sounds like a server config problem but those characters shouldnt be there either

  11. #11
    100% Windoze-free earther's Avatar
    Join Date
    Feb 2003
    Location
    Linuxland
    Posts
    2,788
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by dc dalton
    is there any difference between the two servers? Like one windows, one Linux ... it does sounds like a server config problem but those characters shouldnt be there either
    Yes. The one that's having a problem is a Mac and the one that works OK is a PC running RHEL. On the NoteTab list, someone suggested that the charset=UTF-8 encoding might be the root of the errors.

    I have attached an image of how the file looks in Notepad but when I copy and paste here, you can see that the offending 00s at the line breaks go away.

    Code:
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    
    <head profile="http://gmpg.org/xfn/11">
    <meta http-equiv="Content-Type" content="<?php bloginfo('html_type'); ?>; charset=<?php bloginfo('charset'); ?>" />
    
    <title><?php bloginfo('name'); ?> <?php if ( is_single() ) { ?> &raquo; Blog Archive <?php } ?> <?php wp_title(); ?></title>
    
    <meta name="generator" content="WordPress <?php bloginfo('version'); ?>" /> <!-- leave this for stats -->
    
    <link rel="stylesheet" href="<?php bloginfo('stylesheet_url'); ?>" type="text/css" media="screen" />
    <link rel="alternate" type="application/rss+xml" title="RSS 2.0" href="<?php bloginfo('rss2_url'); ?>" />
    <link rel="alternate" type="text/xml" title="RSS .92" href="<?php bloginfo('rss_url'); ?>" />
    <link rel="alternate" type="application/atom+xml" title="Atom 0.3" href="<?php bloginfo('atom_url'); ?>" />
    <link rel="pingback" href="<?php bloginfo('pingback_url'); ?>" />
    
    <style type="text/css" media="screen">
    /*
    Any more thoughts?

    Off Topic:

    Guess your 'data from hell' ordeal is over?
    Attached Images Attached Images

  12. #12
    SitePoint Wizard gold trophysilver trophybronze trophy dc dalton's Avatar
    Join Date
    Nov 2004
    Location
    Right behind you, watching, always watching.
    Posts
    5,431
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by earther
    Yes. The one that's having a problem is a Mac and the one that works OK is a PC running RHEL.
    And we are suprised at this? I had a 3 month stint with Mac servers a few years back and Ill tell you if there was anything dumb they COULD do they DID!

    I found your funny characters here: http://www.codingforums.com/showthre...threadid=30181
    If Im reading this right they are French >

    Looky here: http://www.cs.tut.fi/~jkorpela/html/french.html


    Or were you talking about the "binary boogers" ? (the square thingies)


    Quote Originally Posted by earther
    Off Topic:

    Guess your 'data from hell' ordeal is over?
    Well yes and no .... got the code done yesterday but Im on try #7 right now. Each time a new adventure in STUPIDITY. I swear this is worse than trying to rip apart a word document and put it into a database in the right fashion... YIKES!

  13. #13
    100% Windoze-free earther's Avatar
    Join Date
    Feb 2003
    Location
    Linuxland
    Posts
    2,788
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by dc dalton
    And we are suprised at this? I had a 3 month stint with Mac servers a few years back and Ill tell you if there was anything dumb they COULD do they DID!
    It isn't my choice of hosts.

    It's not any of the French characters. My guess is "binary boogers" (what a name!). You can see them in the attachment posted above.

    So why can a PC handle them but not a MAC . . rhetorical question. And can it be fixed?

  14. #14
    SitePoint Wizard gold trophysilver trophybronze trophy dc dalton's Avatar
    Join Date
    Nov 2004
    Location
    Right behind you, watching, always watching.
    Posts
    5,431
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Those look EXACTLY like the characters Word puts into a file and then someone copies / pastes it into an html file so yes a Windows box can probably handle them NO PROBLEM... now the Mac server is probably running Linux under it and its say HUH?

    BTW, next time you need hosting?

  15. #15
    100% Windoze-free earther's Avatar
    Join Date
    Feb 2003
    Location
    Linuxland
    Posts
    2,788
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by dc dalton
    Those look EXACTLY like the characters Word puts into a file and then someone copies / pastes it into an html file so yes a Windows box can probably handle them NO PROBLEM... now the Mac server is probably running Linux under it and its say HUH?

    BTW, next time you need hosting?
    The PC is running RHEL. So much for that theory.

    As to hosting, can you beat $5 a month for basically unlimited everything? I think my usual host is running one of these packages http://www.ev1servers.net/english/xeon_series32.asp . . . not sure which one. Not too shabby!

  16. #16
    100% Windoze-free earther's Avatar
    Join Date
    Feb 2003
    Location
    Linuxland
    Posts
    2,788
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Mystery solved

    I have learned that the problem characters are UNIX line breaks (i.e. carriage returns) - why didn't I know that. For some reason, the ftp isn't converting them to a Mac compatible format. Using WS_FTP LE and yes, I uploaded in ASCII. I've not had this problem with other scripts before.

  17. #17
    100% Windoze-free earther's Avatar
    Join Date
    Feb 2003
    Location
    Linuxland
    Posts
    2,788
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    The final word

    Turned out the mystery was not quite solved as of my last post so here's a follow-up FYI . . .

    The Mac server admin did a little research and tweaking and upgraded his ftp server in the process. But the files were still doing weird - but different - things. He posted on a Mac list, as was told that if I upload in binary, the line breaks should remain intact. That so goes against instinct but it seems to work. The UNIX line breaks remain undisturbed ftping either way and the validator isn't choking anymore. Go figure . . .

  18. #18
    SitePoint Wizard gold trophysilver trophybronze trophy dc dalton's Avatar
    Join Date
    Nov 2004
    Location
    Right behind you, watching, always watching.
    Posts
    5,431
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Well judging from the response I think you have stumped about everyone, I know you have me!


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •