Picture of Paul Ooi

Word Press 2.0 Trackback fix revisit

Paul Ooi posted on Tuesday, January 24th, 2006 at 02:03 in Open Source, Technology category.
trackback | RSS 2.0

After follow Ah Knight’s instruction of updating wp_posts to_ping column, it seem like I can’t perform normal trackback again. I got it fix and download the files here. Or read below for more details, there are 2 files need to be change, which is;

  • wp-includes/function-posts.php
  • wp-admin/execute-pings.php

file: wp-includes/function-post.php
line of code: 700

if ( empty($to_ping) )
return;

Instead of doing nothing here, we replace the return; to Ah Knight’s code, become;

if ( empty($to_ping) ) {
$wpdb->query("UPDATE $wpdb->posts SET to_ping = '' WHERE ID = '$post_id'");
return;
}

file: wp-admin/execute-pings.php
line of code: 22

while ($trackback = $wpdb->get_row("SELECT ID FROM $wpdb->posts WHERE TRIM(to_ping) != '' AND post_status != 'draft' LIMIT 1")) {
echo "Trackback : $trackback->ID
“;
do_trackbacks($trackback->ID);
}

Some changes made here, make sure to_ping field is clean and make a trackbacks looping!

$trackbacks = $wpdb->get_results("SELECT ID FROM $wpdb->posts WHERE TRIM(to_ping) != '' AND post_status != 'draft'");

if (is_array($trackbacks) && count($trackbacks)) {
foreach ($trackbacks as $trackback ) {
echo "Trackback : $trackback->ID
“;
do_trackbacks($trackback->ID);
}
}

Done, if you not sure what am I explaning above, you can download the file here in zip format, if you are worry the code is not working, backup your original file.

Happy Trackback!

15 Responses to “Word Press 2.0 Trackback fix revisit”

  1. krootoo. 5 » WP 2.0 Trackbackproblem Says:

    [...] Informationen habe ich auf diesen Seiten gefunden: http://blog.serv.idv.tw/ (Patch wp20-trackback-patch) http://www.paulooi.com/ (Patch wp20_trackback_fixed) http://www.grimmy.de/blog/ http://www.ahknight.net/ http://www.northern-web-coders.de/blog/archiv/2005/12/29/wordpress-20/ [...]

  2. OBCD.iNFO Says:

    at least it works…

    i can now get and send trackbacks thanks to this url :
    http://www.paulooi.com/2006/01/24/word-press-20-trackback-fix-revisit/

    ……

  3. OBCD.iNFO » wordpress 2.0 et les trackbacks … Says:

    [...] Si jamais vous eprouvez le meme probleme, voici ce qui m’a permis de résoudre en partie le probléme : http://www.paulooi.com/2006/01/24/word-press-20-trackback-fix-revisit/ [...]

  4. 엉뚱이의 살아가는 이야기 » Blog Archive » 워드프레스2.0 트랙백 문제 해결 Says:

    [...] 문제를 찾는 중에 폐인희동이님의 포스트에서 해결책을 찾았지만, SQL 명령어를 쓸 줄 몰라 그만두려는데, 그 밑에 커멘트가 달린 Paul Ooi님 블로그에서 문제를 해결했다. [...]

  5. 엉뚱이(heybears) Says:

    now i fixed the error of wp2.0 trackback through your post. thank you so much. god bless you!!!

  6. Paul Ooi Says:

    엉뚱이, your welcome :)

  7. 4bbs Says:

    i’m not sure what’s the exact theory of the upper patch
    but it definitely saves my blog~
    Thanks a lot~~

  8. Trackback problems, Wordpress not doing pings - stefanjuhl.com Says:

    [...] Also check this fix which should make sure that the ‘to_ping’ field is clean etc. I haven’t tested it since but the code seems like it should do the job. [...]

  9. Poldo’s Procrastination Says:

    [...] Still not working? its time for some fixes to core files of WordPress. It seems that version 1.5 isn’t having this problems only to version 2.0+. I have google trackbacks/pingbacks issue in wordpress and have found thousands of results…no answers. Then, I found out there are already hundreds of tickets filed at the WordPress forum. Navigating through each of these tickets would only stress you out and worse, the fix is not there. Luckily for you, I’ll make this simple. Go to this post and follow the changes to made on these files; execute-pings.php on the admin folder and the function-post.php on the include folder of WordPress. Or simply, download the file created by the author and replace the ones in their respective directories. Then test pingbacks/trackbacks at Tamba2 Test Track. [...]

  10. ★imaginekitty★ Says:

    Word Press 2.0 Trackback fix revisit…

    Well, wordpress still stinks in the trackback department. I’ve applied Paul Ooi’s Word Press 2.0 Trackback fix and am attempting to send a trackback to that post.
    Let’s see if it works. *sigh*

    ……

  11. Mark B. Says:

    My trackbacks quit working ever since I made the mistake of upgrading from 1.5 to 2.0.

    They fixed it partially last March (I believe) but now they are back to not working at all.

    With this fix I can receive trackbacks but can not send them.

  12. Mark B. Says:

    OK, sorry. My trackback actually showed up. It just took about 15 minutes.

    Paul Ooi is THE MAN!!! :)

    Thank you, Sir!

  13. 겨울은 언제나 봄을 품고 » Blog Archive » 워드프레스 2.X 트랙백 문제….. Says:

    [...] http://unfusion.kunsan.ac.kr/word/?p=211 여기하고, http://www.paulooi.com/2006/01/24/word-press-20-trackback-fix-revisit/ 여기를 참고해서 문제를 해결해 보려 하였지만…… [...]

  14. Jaypee Says:

    I’m using WP 2.1 and I can’t find those lines in the files you mentioned above. I’m having problems with receiving trackbacks but not sending. Hope someone can help me with this. Thanks! :)

  15. imaginekitty » Blog Archive » Word Press 2.0 Trackback fix revisit Says:

    [...] wordpress still stinks in the trackback department. I’ve applied Paul Ooi’s Word Press 2.0 Trackback fix and am attempting to send a trackback to that [...]

Leave a Reply

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

  • Latest comments

    • sam wah... so clever... lol..(Go)
    • sam 如果飘到檀香山..(Go)
    • hito big boss is mike tan..(Go)
    • Andru The one on Najis Razak ..(Go)
    • Richard I am an ex pro of nearl..(Go)
    • liang friend , please dont bu..(Go)
    • 矮子 welcome welcome..(Go)
    • vincenthue ah paul go Crabby.. wah..(Go)
    • KenFulton Can it be use in my wir..(Go)
    • Paul Ooi hehee.. yeah!..(Go)
  • Latest commented posts

  • Most commented posts

  • for technology, unix, freebsd, securty related reading, visit takizo.com