Need help? Check out our Support site, then


Akismet widget not xhtml valid

  1. I use the sapphire theme. Beautiful. Also installed the akismet widget. I see that sapphire uses xhtml transitional 1.0 doctype so i validated against http://validator.w3.org. Problems with the Akismet code. A css-file is imported by Akismet like this <link rel="stylesheet" href="http://martinisrunning.wordpress.com/wp-content/plugins/akismet/akismet.css" type="text/css" media="screen" charset="utf-8">
    I am missing the end tag. Like this .... charset="utf-8"/>. Also the Akismet-widget code is in a div like this <div id="akismet1">. The validator has a problem with that. Can this be fixed?? Thanks in advance. I always like it to have a tidy coding..... :)

  2. you should send this in as feedback from your dashboard.

  3. Oops exsqeeze me. Corrected instantly. Thx for the tip sunburntka.

  4. it's not a big deal, it's just something we can't fix.

    FWIW, part of the reason it's invalid is that <div> tags aren't allowed inside lists. most themes use lists for their sidebars widgets. themes that use div's for sidebars woud, hypothetically, validate. (i don't think any such themes exist on wordpress.com)

  5. But the css link is fixable isn't it? What means FWIW? Pretty please please fix it and valid it.....

  6. the css link has to be fixed by the admins (hence sending in feedback).

    FWIW = For What It's Worth

  7. Ah, that realy brings me up to speed again. Thanks again sunburntka. I wonder though. How do I know whether the bug-report will be mended or not. I.e. how do the admins give me feedback? Do I get a email?

  8. if they are going to fix it, you'll get an email.
    if not, they'll probably just ignore it. if you'd like a better feedback loop, you can go to http://trac.wordpress.org and make a new ticket explaining the validation problem. (you'll have to create a profile in the wordpress.org forums first)

  9. great man, I still do have a account there, so I'll head on over to do as you proposed. great tip :idea:

  10. Is there where the widget plugin is being supported? I came across an issue with one of them as well.

  11. Seems the the Akismet widget which comes with WordPress version 2.1 is still not XHTML valid.

    How tow fix it?

  12. Got a link to show where it's not valid? Or the error? Right now, all I can do is guess I'm afraid.

  13. Below are the results of checking this document for XML well-formedness and validity.

    1. Error Line 261, column 114: document type does not allow element "div" here; missing one of "object", "applet", "map", "iframe", "button", "ins", "del" start-tag .

    ...smet.com" title=""><div id="akismet1"><span id="akismetcount">805</span> <spa

    The mentioned element is not allowed to appear in the context in which you've placed it; the other mentioned elements are the only ones that are both allowed there and can contain the element mentioned. This might mean that you need a containing element, or possibly that you've forgotten to close a previous element.

    One possible cause for this message is that you have attempted to put a block-level element (such as "<p>" or "<table>") inside an inline element (such as "", "<span>", or "<font>").

    2. Error Line 261, column 218: document type does not allow element "div" here; missing one of "object", "applet", "map", "iframe", "button", "ins", "del" start-tag .

    ...ntare</span></div> <div id="akismet2"><span id="akismetbb">blockiert von</spa

    The mentioned element is not allowed to appear in the context in which you've placed it; the other mentioned elements are the only ones that are both allowed there and can contain the element mentioned. This might mean that you need a containing element, or possibly that you've forgotten to close a previous element.

    One possible cause for this message is that you have attempted to put a block-level element (such as "<p>" or "<table>") inside an inline element (such as "", "<span>", or "<font>").

  14. I changed line 602 of akismet.php to

    <div id="akismetwrap"><div id="akismetstats"><a href="http://akismet.com" title=""><span id="akismet1"><span id="akismetcount"><?php echo $count; ?></span> <span id="akismetsc"><?php _e('spam comments') ?></span></span> <span id="akismet2"><span id="akismetbb"><?php _e('blocked by') ?></span><br /><span id="akismeta">Akismet</span></span></a></div></div><br />

    and it passes XHTML validation.

  15. The Akismet plugin which comes with WordPress 2.1.1 has still the XHTML bug.

    So you can download akismet.php from my blog page - I fixed it and it is now XHTML valid code.

    http://www.blogkom.net/wp/download/akismet.php.zip

  16. Best bet would be to send in a report directly to akismet. We can't do anything about it here since we don't have access to the files.

    You may also want to discuss this over at http://wordpress.org as well since the plugin is available with teh wordpress software that you can download from there.

    Regards,
    -drmike

Topic Closed

This topic has been closed to new replies.

About this Topic