Make WordPress Core

Opened 18 years ago

Closed 18 years ago

#3331 closed defect (bug) (fixed)

Interoperability -- Trackback does not work with MSN Spaces

Reported by: nobrain2000's profile nobrain2000 Owned by: markjaquith's profile markjaquith
Milestone: 2.1 Priority: normal
Severity: normal Version: 2.0.4
Component: XML-RPC Keywords: MSN trackback
Focuses: Cc:

Description (last modified by markjaquith)

If you have MSN Space ping a permanent link of a WP blog, the ping is ignored by WP. The other way (WP ping MSN Space permanent link) works fine.

I did some investigation of this problem. There are two problems that prevents WP from processing trackback pings from MSN.

  1. MSN does not seem to conform to the trackback protocol. Specifically, it does not POST the title field, which is required by WordPress. While does sounds like an MSN Space problem, the embarassing fact is that all other blogging software, including Typepad and MT, works with MSN just fine.

Below is my workaround:

In wp-trackback.php, add the following:

if(empty($title)){
    $title=$excerpt;
    if(preg_match("/spaces\.live\.com/i",$tb_url))
    {
      $excerpt="";

    }
}
if(empty($title)) $title="No title";

Now that you added the above code, you will see the trackback entry in your blog, but the URL (to the MSN Space permanent link) is wrong. This is because of the second problem. See below:

  1. WP removes all the !'s in URLs, and MSN permanent link URLs have !'s in them.

I worked around this by chainging clean_url() in comment-functions.php so that it does not remove ! from URLs. Below is the code:

function clean_url( $url ) {
   if ('' == $url) return $url;
   #note ! is added to the regexp below.
   $url = preg_replace('|[^a-z0-9-~+_.?#=!&;,/:]|i', '', $url); 
   $url = str_replace(';//', '://', $url);
   $url = (!strstr($url, '://')) ? 'http://'.$url : $url;
   $url = preg_replace('/&([^#])(?![a-z]{2,8};)/', '&$1', $url);
   return $url;
}

Change History (6)

#1 @markjaquith
18 years ago

  • Description modified (diff)

Just updating the code wrapping to work with WikiFormatting

#2 @markjaquith
18 years ago

The Trackback technical specification says that title is optional... so that should be fixed (generally... not just with MSN-specific code).

I don't think that there was a specific reason for filtering ! out (it was probably just forgotten, since it works with a list of allowed characters), so unless anyone objects, that should go in, too.

The only thing I'm not sure about is what to use at the title if the trackback title is omitted. If we leave it blank, the templates will show a blank hyperlink. We could visit the URL and extract the <title /> ...

#3 @markjaquith
18 years ago

  • Milestone set to 2.1
  • Owner changed from anonymous to markjaquith
  • Status changed from new to assigned

#4 @matt
18 years ago

  • Resolution set to wontfix
  • Status changed from assigned to closed

I don't think we should allow titleless trackbacks.

#5 @nobrain2000
18 years ago

  • Resolution wontfix deleted
  • Status changed from closed to reopened

MSN, Typepad, and MT all support this, and they handle this gracefully.

Also, I was talking about two bugs -- one has nothing to do with trackback per se.

#6 @matt
18 years ago

  • Resolution set to fixed
  • Status changed from reopened to closed

I fixed the exclamation points, but I'm not particularly interested in titleless trackbacks. MSN Spaces can support pingbacks.

Note: See TracTickets for help on using tickets.