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.

在〈Patch for WordPress 2.0 trackback issue〉中有 64 則留言

  1. I don’t have the tar program. Is it possible to get the trackback fix files in .zip?

    Thank you for your help.

  2. John:
    I’ve put a link for patches in zip format now.

    mark:
    I will join the discussion thread and see if I can provide some help 🙂

  3. PipperL,

    When I FTP the two patched files to my site, suddenly I get a whole string of errors at the top of my page. I had to restore the original files to get rid of them.

    I know that Mark gave up and reverted to 1.5 I’d like to stick to 2.0 but only if I can get this issue fixed.

  4. 自動引用通知: Wordpress 2.0 Trackback Fehler » Grimmy.de - Wir erzählen keine Märchen-
  5. John:
    Try to give me more info about what the errers is. If you don’t want to post error messages in this public area, you can contact me privately via my email: pipperl at serv.idv.tw.

    with regards.

  6. 自動引用通知: djchuang.com
  7. 自動引用通知: »» Don't Touch Me ««
  8. 自動引用通知: Almost Finished Upgrading at Animus Ex Machina
  9. 自動引用通知: [digital:meditation] » wordpress 2.0 trackback issues…
  10. 自動引用通知: Mostly Muppet Dot Com
  11. 自動引用通知: Las penas del Agente Smith » Wordpress 2.0
  12. This didn’t work for me. I uploaded the patched files to the appropriate directories. I set the read/write/execute permissions so that they could be accessed. Nothing changed. I still can’t sent trackbacks.

    What do I do?

  13. Terrance:

    try the following url on your browser:
    [blog_url]/wp-admin/execute-pings.php

    If there is any output like “Trackback : XXX” (Where XXX is a number refer to your blog id), you may want to examine the specific post and trackback url.

    It may also happened that your trackback be banned by others. You may try to trackback/ping yourself.

  14. 自動引用通知: www.astrid-wiedmann.de
  15. Thanks, the patch helped me on.
    After applying the patch, I can receive trackbacks just fine. But sending trackbacks still doesn’t work automatically.

    I have to use this URL to send my trackbacks:
    [blog_url]/wp-admin/execute-pings.php

    Why are they not sent directly after publishing a post?

  16. 自動引用通知: feik.org » wordpress 2.0 und track
  17. 自動引用通知: Eine Webseite, die begeistert…von Jörg Lang » Wordpress 2.0 Trackback Problem
  18. 自動引用通知: Energie Wg » Blog Archive » Trackback & WordPress 2.0
  19. 自動引用通知: senorpez » Wordpress 2.0 Trackback Problems
  20. 自動引用通知: sv blog » Blog Archive » Upgrade auf Wordpress 2.0
  21. 自動引用通知: Swanky Conservative » Blog Archive » Trackback tests
  22. Excuse me, PipperL, but where I must to put and execute this command lines?

    patch functions-post.php functions-post.php.diff
    patch execute-pings.php execute-pings.php.diff

    In MySQL prompt? Ftp program? Browser?
    I am a writer, I am not good with this things. 🙂
    Thank you!
    Best regards
    Yuri

  23. Yuri:
    The commands metioned must be executed in shell mode on the server. If you have no idea of what that mean, you can download the “patched version” and put it on.

  24. 自動引用通知: jsingh.net: just jag!
  25. 自動引用通知: James Stephens » Boosting And Monitoring Traffic On Wordpress
  26. 自動引用通知: Hirobee's Trail [Memorandum]
  27. I posted the inquiry in wordpress.org support forum but got no reply. finally i arrived at here via google on “wordpress+trackback+2.0.” i think im gonna try this one out tonight at home. at any rate, appreciate your work very much in advance. cheers!

  28. Hi,

    I followed:
    > 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.

    From ZIP format, took out two files and uploaded each to respective dir. but does not work for me either, yet., as some have mentioned earlier. Did I miss anything?

    Appreciate suggestions.

  29. Had the same trouble with 2.0.1. Used the MySQL update instruction, nothing, used the patches found here, nothing. Even directly calling the execute-pings.php file didn’t work.

    So I thought that maybe it was a memory problem. I opened the .htaccess file and added the following line at the beginning:
    php_value memory_limit 16M

    Now trackbacks still don’t work while publishing new posts (or saving old ones), but directly calling the execute-pings.php does the trick. I hope this helps. And I’ll wait for the next release to completely solve the matter.

  30. 自動引用通知: Sascha Goebels WebLog » Blog Archive » Trackback Bug Fixed
  31. Antiorario, your solution hit the nail on the head…. I’ve got 4 wordpress installs in the same virtual private server and ONE stopped doing trackbacks suddenly… after an upgrade to 2.0.2, it would go to a blank page after posting or editing an article. I essentially upped the memory limit to 32M in /etc/php.ini (which should have the same effect only more memory…) everything now works. If possible you might experiment with a higher memory limit. My trackbacks stopped working at around 800 or so posts I think.

  32. Hi there…

    I put the update function into mysql and it said ok…. ubt neither trackbacks or pingbacks worked… then I used your patch by uploading each and of course WITH .diff at the end… Nothin…

    Then I thought, how dumb of me, I should take the .diff off at the end and replace file…. but that didnt work either, it only gave me funky code at the top…. can anyone help? Trackbacks are important for me. What do I do to install the patch? When I put execute-pings addresss into my browser it finds file but give me some more funky code…. Im a moron, please help…

    🙂

  33. Hi Athene:
    You can try to upgrade to WP 2.0.2, the patch/code has been merged into dev’s codebase since WP 2.0.1.

  34. 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.

  35. 自動引用通知: svoogle.ORG » Blog Archive » Trackback Fehler in Wordpress
  36. 自動引用通知: svoogle.ORG » Blog Archive » Trackback Fehler in Wordpress
  37. 自動引用通知: Almost Finished Upgrading at Animus Ex Machina
  38. 自動引用通知: HINA::工程幼稚園 » Blog Archive » Trackbacks 的研究

留言功能已關閉。