template_rdf not working in 2.2 (4 posts)

  1. rlrr
    Posted 9 years ago #

    template_rdf() isn't working correctly. Line 242 in comment-template.php:

    if (strpos($_SERVER['HTTP_USER_AGENT'], 'W3C_Validator') !== false) {

    Replacing it with:

    if (!stristr($_SERVER['HTTP_USER_AGENT'], 'W3C_Validator')) {

    fixes the problem.

    Basically it was working the the opposite of what was expected. The trackback code was appearing when trying to validating the page and wasn;t appearing otherwise.

  2. MichaelH
    Posted 9 years ago #

    Just for clarification, did you have the template tag, trackback_rdf, wrapped in an HTML comment as recommended ?

  3. rlrr
    Posted 9 years ago #

    Now that you mention it, no (but I will do so, thanks). That would make no difference in what I saw, though.

  4. Changing it to:

    if (strpos($_SERVER['HTTP_USER_AGENT'], 'W3C_Validator') == false) {

    Would be slightly faster, in theory.

    Anyway, I put this bug into trac:

Topic Closed

This topic has been closed to new replies.

About this Topic