Auto-discovery not discovering click throughs

jockox3@drupal.org - September 15, 2007 - 03:31
Project:TrackBack
Version:5.x-1.x-dev
Component:Receiving
Category:bug report
Priority:critical
Assigned:Unassigned
Status:active
Description

Following on from a moribund report at http://drupal.org/node/66127 and my fruitless request for information at http://drupal.org/node/167414 I'm resubmitting this as a bug in the latest development version:

From the description of what the module should do, it ought to pick up every? page request and check whether the http_referrer has either already been stored as a trackback_received and if not check whether the referring page has a link to the page being requested.

It does not appear to be doing this.

I'm no great coder by any means, but I've managed to get a debug environment set up using Komodo, and it does not appear to invoke anything that calls "trackback_receive" which I presume is where it launces the various checks to see if a referrer or a pinging site contains a valid trackback and if so to process it.

I am more than willing to try and fix this on my own and submit what I find (as I am desperate for this functionality, without whhich it seems that trackback does not really do either what it says it should nor conform to the up-to-date way of thinking about trackbacks in the wider world - that posters should not have to go looking for a trackback url and explicitly ping it from their posts). But I'm not sure what "hook" should be being called when a page is loaded to do these checks - if someone could point me in the right direction I can have a go.

Unless someone can confirm that they have this working correctly with these autodiscovery clickthroughs?

Cheers,

Jock

#1

jockox3@drupal.org - October 1, 2007 - 01:34

Right well this has taken me long enough, and from what I can see it is working on my site. I cannot work out how to create a patch file, and since I've been working on this far too long and not writing that will need to wait. But if anyone wants to have a look at what I've done to get this working I attach the .module file below.

Note, you will also need to drop simplepie.inc available from simplepie.org into the module directory for it to work. Basically what it does is set out in my blog post, summarized roughly as follows:

1. START processing:
2. When cron runs,
3. For each row in the access_log table that accesses a Drupal node and has a referrer URL since the last time cron ran
4. Try to fetch an RSS type feed url from the referrer site.
5. If the site doesn't provide a feed url, then it's likely it's not a blog or news type site and we can stop processing.
6. If it does provide a feed url, fetch the feed and parse it.
7. For each article in that feed check whether it contains a reference to the Drupal node referred to in the access_log record.
8. If it does not contain a reference to said Drupal node we can stop processing.
9. If it does, extract an excerpt and title from the article in the feed and save the whole lot into the trackbacks_received table. It should then appear under the node on my site when it is viewed.
10. STOP processing.

I suppose in thgeory this should nbow produce a trackback autodiscovery event on my own site - maybe. Let's see shall we!

AttachmentSize
trackback.module.txt 49.75 KB
 
 

Drupal is a registered trademark of Dries Buytaert.