Patch for WordPress 2.0 trackback issue
After upgrading to wordpress 2.0, I found the WP2.0 is failed to send trackback.
This issue is also confirmed by ijliao, priv, and Ah Knight’s Blog.
There has been a workaround in Ah Knight’s Blog for this issue.But even you clean up the “to_ping” field, you may encounter this issue again later. Instead of clean up the “to_ping” field times by times, I try to dig the bug out from the source.
The bug is intrduced by an infinite-loop condition located in wp-admin/execute-pings.php, which is implemented for “ping deley removed” feature in WordPress 2.0. If you have any un-sent and failed-to-sent trackbacks, this bug will cause the script continuously trying to send the first trackback in the “to_ping” field, and failed to process the other to_pings.
Which conditions will cause “to_ping” fail to be sent?
First, it occurs when the trackback url can’t be reached. Maybe the site has been closed, maybe he refuses receiving trackbacks. The url will remain in the “to_ping” field and make the infinite-loop triggered.
Second, there is another bug existed in wp-includes/function-post.php. When the content in “to_ping” field is nothing but some character like “\n”, the get_to_ping() function will return an empty array, then do_trackback() will just return nothing, let the “to_ping” field untouched. It will also cause the infinite-loop triggered.
I’ve make a patch for fixing these two bugs.you can download them here(Or try the ZIP version). Make sure that you’ve put them into the correct dirs(wp-admin for execute-pings.php.diff and wp-includes for functions-post.php.diff) and applied the patch by executing following command:
patch functions-post.php functions-post.php.diff
patch execute-pings.php execute-pings.php.diff
Please don’t just rename the .php.diff to .php then upload them.
****IMPORTMENT****
For those don’t know what the patch is, or don’t know how to use patch, please read the following:
I’ve made the patched file for your convenience. Now you can download the patched source in tgz format or ZIP format. All you need to do is just uploading and putting them into the correct dirs.
Hope the WordPress dev team fix the bugs(including pingback issue) in the next release/patch AFAIK, this patch has been put into the codebase of WordPress.
PS. A chinese version for this post can be found here.
Update:
The Patch has been merged into dev’s codebase since WP 2.0.1. Recommend to upgrade your WP to 2.0.2 if you are still using 2.0.
If you already use 2.0.1/2.0.2 please do not try to apply this patch.
延伸閱讀
更多閱讀選擇
- [同類] 最近愛用的plugin
- [同類] 讓 WP2.0 可以正常trackback
- [標籤] 本文尚無標籤
- [2009] 家庭日:綠世界(三)
- [2008] Punch Party 9 隨記
- [2007] 全球之聲一週間 1223-1229
- [2005] 讓 WP2.0 可以正常trackback
文章資訊
- 所屬分類:BlogLog、 Software
- 最後修改:2005/12/29 16:31
- 引用本文:Trackback URL
- 訂閱迴響:Comments RSS

- 文章授權:參閱創用CC或連絡作者
- 了解本站:本站導覽、回到首頁
- 收藏本文:
artcrafts
Is this fixed in wordpress 2.02 already?
I think I still have the same problem even with the patch. I’ll just wait for the official fix.
Jim:
Yes. The issue fixed since 2.0.1
[...] As some may have noticed, i tested a little bit the last days. Trackbacks didn’t work on this blog and i didn’t know why. After reading a lot in the Wordpresse-Forum and trying several things out, i finally found the problem and solved it – sort of. [...]
[...] Stundenlang gesucht, im Wordpress Forum gefragt, zig Blogs mit der Problematik angesteuert und Tips umgesetzt, aber nichts hat geholfen. Dann noch das Patch ausprobiert, welches ebenfalls nicht geholfen hat und dann nach und nach Plugins ausgeschaltet und immer wieder trackback zu svoogle.org gesendet, bis es dann endlich geklappt hat. der “Übeltäter” war [...]
[...] Stundenlang gesucht, im Wordpress Forum gefragt, zig Blogs mit der Problematik angesteuert und Tips umgesetzt, aber nichts hat geholfen. Dann noch das Patch ausprobiert, welches ebenfalls nicht geholfen hat und dann nach und nach Plugins ausgeschaltet und immer wieder trackback zu svoogle.org gesendet, bis es dann endlich geklappt hat. der “Übeltäter” war das Wordpress Plugin Anti Spam Image 0.4 (nicht verlinkt, da die Seite offensichtlich nicht mehr existiert). Auf jedenfall musste man durch dieses Plugin vor dem Submit eines Kommentars einen Sicherheitscode eintippen und dieser hat wohl Trackbacks und Pingbacks geschluckt…jetzt scheint es jedenfalls wieder 100% zu funktionieren. [...]
Yes. The issue fixed since 2.0.1
I just installed the patch that should fix the Wordpress 2.0 Trackback Bug.
[...] [WordPress] トラックバックがとばない現象で 2006年 11月 17日 金曜日 よく WordPress を使用していてトラックバックが飛ばない、という現象をフォーラムやブログ記事のエントリーで目にします。phpに割り当てるメモリが足りないとか、functions-post.php, execute-pings.php が何も入力されていない場合に無限ループになるとかで、パッチをあてられたものが配布されていたりします。まだ原因が解明できていないケースが多いようなのですが、もしかすると案外原因はシンプルな可能性があります。 [...]
Thanks
Then I thought, how dumb of me, I should take the .diff off at the end and replace file
just installed the patch that should fix the Wordpress 2.0 Trackback Bug
[...] a few issues with the pingback/trackback features, the read up and a third party patch can be found here. I’m guessing this has already been submitted as a bug, but I have not checked as of [...]
[...] 網路暴民 http://jacky.seezone.net/archives/001647.html 終極邊疆BLOG http://blog.serv.idv.tw/2005/12/29/380/ Wiki [...]