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

  3. 引用通告: Wordpress 2.0 Trackback Fehler » Grimmy.de - Wir erzählen keine Märchen-
  4. 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.

  5. 引用通告: djchuang.com
  6. 引用通告: »» Don't Touch Me ««
  7. 引用通告: Almost Finished Upgrading at Animus Ex Machina
  8. 引用通告: [digital:meditation] » wordpress 2.0 trackback issues…
  9. 引用通告: Mostly Muppet Dot Com
  10. 引用通告: Las penas del Agente Smith » Wordpress 2.0
  11. 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?

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

  13. 引用通告: www.astrid-wiedmann.de
  14. 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?

  15. 引用通告: feik.org » wordpress 2.0 und track
  16. 引用通告: Eine Webseite, die begeistert…von Jörg Lang » Wordpress 2.0 Trackback Problem
  17. 引用通告: Energie Wg » Blog Archive » Trackback & WordPress 2.0
  18. 引用通告: senorpez » Wordpress 2.0 Trackback Problems
  19. 引用通告: sv blog » Blog Archive » Upgrade auf Wordpress 2.0
  20. 引用通告: Swanky Conservative » Blog Archive » Trackback tests
  21. 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

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

  23. 引用通告: jsingh.net: just jag!
  24. 引用通告: James Stephens » Boosting And Monitoring Traffic On Wordpress
  25. 引用通告: Hirobee's Trail [Memorandum]
  26. 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!

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

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

  29. 引用通告: Sascha Goebels WebLog » Blog Archive » Trackback Bug Fixed
  30. 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.

  31. 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…

    🙂

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

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

留言功能已關閉。