Support » Themes and Templates » Freakish Behavior with HTML Validator

  • I am working on some WP templates and I painstakingly (via Firefox’s developer toolbar) made sure that each and every design (there are 12 now!) validated with the HTML validator.

    I love to see that green “passed” text. I get a cheap thrill that way. Well, after I loaded all my themes, I decided to click the Valid XHTML button at the bottom of the page.

    13 validation errors and they all had to do with an ID “Comments-Listing”, which I could find NOWHERE in any of my templates.

    http://wpthemes.mytestbed.com/temp/wp-themes-no-validate-fluke.jpg

    Then just as quickly as it appeared (while I was revalidating all the themes), it vanished.

    Any ideas what’s causing this. I want to be able to click on that Valid XHTML button with confidence, and I want you to be able to also. Gah.

    The site is here and you should be able to validate any of those themes.
    http://wpthemes.mytestbed.com

Viewing 5 replies - 1 through 5 (of 5 total)
  • Joni, I know what you mean about the cheap thrill. 🙂

    It *looks like* the validator is saying that you’ve used an ID more than once on the page. Switch it to a class, and that error should stop.

    Thread Starter jonimueller

    (@jonimueller)

    That’s the thing, Diane, I am NOT. It is nowhere in my code AND furthermore, AFTER I got the errors (see screenshot provided) without me having done anything to the sites/themes at all, it then validated properly.

    🙁

    Thread Starter jonimueller

    (@jonimueller)

    It’s bellyaching about ID Comments-List. I’ve searched each template for this code string and it flat isn’t there. This is like a phantom that appears/disappears/reappears. Any ideas, folks? It’s very frustrating.

    If you view source when it’s in its non-validating mode the ID shows up. But what I’m saying is SOMETHING is generating it, because it does not exist in any template that I have.

    Thread Starter jonimueller

    (@jonimueller)

    Now it’s validating again, but for the latest entry, which is a paid for theme, of course you have to correct the PayPal generated code and even then it won’t validate because of some hyphens that are required in the payment code.

    Merry Christmas everyone!!

    I get the same thing for some RSS button feed links; they just don’t validate.

    Okay; I found ONE use of “comments-list” on a page with comments. I also searched the (my) entire set of WP2.0.5 files and found NO use of “comments-list”, ID or otherwise (I was hoping it was buried in there somewhere).

    What’s strange is that it looks like you got that validation error on your home page, whereas the only use of “comments-list” is on single.php where the comments are located.

    Given that code cannot just appear and disappear, I’ve got a few ideas:

    (1) you have a cache which is confusing things somehow.

    (2) you have some incorrect or incomplete code which is somehow throwing off stuff below it in the validator.
    (I’ve had that one.) For instance, it is not liking the alt attribute on the a href tag for your images (should be, if anything, a title attribute, as it’s a link). Otherwise, all the pages seem to validate.

    (3) WordPress is combining some tags somehow that occasionally end up with “comments-list”?
    How about changing your #comments-list to #listocomments and seeing whether you get a recurrence of the error?

    Anyway, Merry Christmas!

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Freakish Behavior with HTML Validator’ is closed to new replies.