WordPress.org

Make WordPress Core

Opened 10 years ago

Closed 9 years ago

#1324 closed defect (bug) (worksforme)

Unable to send/receive pingbacks and send trackbacks.

Reported by: macmanx Owned by:
Milestone: Priority: normal
Severity: major Version: 1.5.1
Component: General Keywords:
Focuses: Cc:

Description

After upgrading to WP v1.5.1, I can receive trackbacks, but I cannot send trackbacks, nor can I send or receive pingbacks. My server error logs are absolutely blank. And I have attempted as many troubleshooting steps as I know, including re-upgrading from the .tar.gz version (previously used the .zip version), using a different FTP app to upload the files, and testing trackbacks/pingbacks with all plugins deactivated and using the default theme. I'm out of ideas, and I'm pretty sure this is a WP bug as I had no problems with pingbacks or trackbacks in WP v1.5.

If you would like it, my phpinfo file is available upon request via email to james at macmerc dot com.

Attachments (4)

url_to_postid.diff (4.6 KB) - added by macmanx 10 years ago.
wp_remote_fopen.txt (557 bytes) - added by macmanx 10 years ago.
wp_remote_fopen.diff (909 bytes) - added by macmanx 10 years ago.
wp_remote_fopen.2.diff (1.4 KB) - added by macmanx 10 years ago.

Download all attachments as: .zip

Change History (48)

comment:1 @macmanx10 years ago

  • Patch set to No

comment:2 @macmanx10 years ago

I should also add that my server error logs are empty for today, and that I am having any issue with pinging ping-o-matic (bug# 1325) which may be related.

comment:3 @macmanx10 years ago

Update: I'm having the same problems with a brand-new fresh WP v1.5.1 installation.

comment:4 @macmanx10 years ago

I made it work! Huuzzzah! I guess I just had to hit it like an old toaster. Here's what I did (make sure you have time to try it, because it worked for me, and I'm not trying it any other way).

  1. Send a pingback from one post in v1.5.1 blog to another post in the same blog. Confirm that pingbacks do not work.
  1. Set up a brand new v1.5.0 blog (hope you have a back up).
  1. Send a pingback from one post in v1.5.0 blog to another post in the same blog. Confirm that pingbacks are working correctly.
  1. Send a pingback from one post in the v1.5.0 blog to another in the v1.5.1 blog. Confirm that pingbacks are working correctly (they should by now).
  1. Send a pingback from one post in the v1.5.1 blog to another in the v1.5.0 blog. Confirm that pingbacks are working correctly.
  1. Send a pingback from one post in v1.5.1 blog to another post in the same blog. Confirm that pingbacks are working correctly.

That's the best I can do to describe it ... and it still doesn't make sense. But at least the pingbacks are working.

comment:5 @macmanx10 years ago

Ok, pingbacks and trackbacks are once again completely not functional.

comment:6 @btvillarin10 years ago

Per James' requestion, I'm chiming in - I have the same problem.

comment:7 @macmanx10 years ago

Goodness, this is very confusing. I think I miss-spoke earlier, and this issue may be too widespread to test. Here's what I know:

  1. I am able to send and receive pingbacks between my own blogs.
  1. I cannot send or receive trackbacks and pingbacks to or from Podz' test blog.
  1. In this post, http://www.macmanx.com/wordpress/archives/2005/05/10/wordpress-v151-bugs/, I sent pingbacks to all the v1.5.1 users that I know: Bryan (btvillarin), Tom (tomraftery), Podz, Craig (nuclearmoose), and Matt. Only Craig received my pingback.
  1. http://wordpress.org/support/topic/33208?page=1#post-188326 Moshu claimed to have sent a pingback to one of my recent posts. But, I never received it.
  1. I just received a test trackback and pingback from Matt.
  1. My v1.5.0 test blog is working perfectly, as did all of my blogs before upgrading to v1.5.1.

That's all I know, it's very confusing.

comment:8 @macmanx10 years ago

The score so far after two more tests:

  1. I am able to send and receive pingbacks between my own blogs.
  1. I cannot send or receive trackbacks and pingbacks to or from Podz' test blog.
  1. In this post, http://www.macmanx.com/wordpress/archives/2005/05/10/wordpress-v151-bugs/, I sent pingbacks to all the v1.5.1 users that I know: Bryan (btvillarin), Tom (tomraftery), Podz, Craig (nuclearmoose), and Matt. Only Craig received my pingback.
  1. http://wordpress.org/support/topic/33208?page=1#post-188326 Moshu sent a pingback to one of my recent posts. But, I never received it.
  1. I just received a test trackback and pingback from Matt.
  1. My v1.5.0 test blog is working perfectly, as did all of my blogs before upgrading to v1.5.1.
  1. I successfully sent a pingback to both Matt and Craig (sorry guys).
  1. I received two trackbacks while I was away.

This is all very confusing, but it looks like I am having no trouble sending or receiving pingbacks. ::sigh:: Unfortunately, most of the blogs that I have attempted to test against, are having difficulty receiving my pingbacks.

It looks like I'm in the clear, but there plenty of other individuals who are currently having problems with trackbacks and pingbacks.

comment:9 @macmanx10 years ago

::sigh:: More problems. This is very frustrating. I don't know how to distinguish any of this. Can we please go back to using fopen() for pingbacks and trackbacks? Here are my notes so far:

  1. I am able to send and receive pingbacks between my own blogs.
  1. I cannot send or receive trackbacks and pingbacks to or from Podz' test blog.
  1. In this post, http://www.macmanx.com/wordpress/archives/2005/05/10/wordpress-v151-bugs/, [] I sent pingbacks to all the v1.5.1 users that I know: Bryan (btvillarin), Tom (tomraftery), Podz, Craig (nuclearmoose), and Matt. Only Craig received my pingback.
  1. http://wordpress.org/support/topic/33208?page=1#post-188326 [] Moshu sent a pingback to one of my recent posts. But, I never received it.
  1. I just received a test trackback and pingback from Matt.
  1. My v1.5.0 test blog is working perfectly, as did all of my blogs before upgrading to v1.5.1.
  1. I successfully sent a pingback to both Matt and Craig (sorry guys).
  1. I received two trackbacks while I was away.
  1. I sent a trackback to Podz' test site, requested a trackback from Podz' test site, sent a pingback to Podz' test site, and requested a pingback from Podz' test site. All instances failed.
  1. I sent a trackback to Owen's test site (Pingomation), requested a trackback from Owen's test site, and requested a pingback from Owen's test site. I successfully received the requested trackback, all other instances failed. The failed requested pingback test returned the following debug info:

Error.
Fault code: 16 : The source URI does not exist.
POST /wordpress/xmlrpc.php HTTP/1.0
Host: www.macmanx.com
Content-Type: text/xml
User-Agent: The Incutio XML-RPC PHP Library -- RedAlt/Pingomation
Content-length: 430

<?xml version="1.0"?>
<methodCall>
<methodName>pingback.ping</methodName>
<params>
<param><value><array><data>
<value><string>http://redalt.com/pinged/http%3A%2F%2Fwww.macmanx.com%2Fwordpress%2Farchives%2F2005%2F05%2F10%2Fwordpress-v151-bugs%2F</string></value>
<value><string>http://www.macmanx.com/wordpress/archives/2005/05/10/wordpress-v151-bugs/</string></value>
</data></array></value></param>
</params></methodCall>

<?xml version="1.0"?>
<methodResponse>
<fault>
<value>
<struct>
<member>
<name>faultCode</name>
<value><int>16</int></value>
</member>
<member>
<name>faultString</name>
<value><string>The source URI does not exist.</string></value>
</member>
</struct>
</value>
</fault>
</methodResponse>

comment:11 @macmanx10 years ago

Updated list: I know why the test pingback failed in number 10.

  1. I am able to send and receive pingbacks between my own blogs.
  1. I cannot send or receive trackbacks and pingbacks to or from Podz’ test blog.
  1. In this post, I sent pingbacks to all of the v1.5.1 users that I know: Bryan, Tom, Podz, Craig, and Matt. Only Craig received my pingback.
  1. Moshu sent a pingback to one of my recent posts. But, I never received it.
  1. I received a test trackback and pingback from Matt.
  1. My v1.5.0 test blog is working perfectly, as did all of my blogs before upgrading to v1.5.1.
  1. I successfully sent a pingback to both Matt and Craig (sorry guys).
  1. I received two trackbacks while I was away.
  1. I sent a trackback to Podz’ test site, requested a trackback from Podz’ test site, sent a pingback to Podz’ test site, and requested a pingback from Podz’ test site. All instances failed.
  1. I sent a trackback to Owen’s test site (Pingomation), requested a trackback from Owen’s test site, and requested a pingback from Owen’s test site. I successfully received the requested trackback, the requested pingback was denied access by my server configuration (I believe this is an issue with the ping being sent by an open proxy since most other test pingbacks are arriving safely), but my sent trackback never arrived as planned.

comment:12 @macmanx10 years ago

Here's a new summary that will either help or confuse the h*ll out of you.

I can send and receive trackbacks and pingbacks via NuclearMoose's blog.
Btvillarin cannot send and receive trackbacks and pingbacks via NuclearMoose's blog.

I cannot send and receive trackbacks and pingbacks via Podz' test blog.
Btvillarin can send and receive trackbacks and pingbacks via NuclearMoose's blog.

edited on: 05-12-05 05:13

comment:13 @ryan10 years ago

For incoming pingbacks, try the wp_remote_fopen.diff patch. If you don't have patch available you can replace your version of wp_remote_fopen() in functions.php with wp_remote_fopen.txt.

This patch uses curl only if 'allow_url_fopen; is false. If your host allows url fopen, then fopen will be used as it was in 1.5.

comment:14 @klklaser10 years ago

Rboren, may I suggest moving fclose($fp) from line 1189 xmlrpc.php into your rewritten wp_remote_fopen() function?

comment:15 @ryan10 years ago

Yes. I moved it in my view when I noticed the warning. I'll update the patch.

PHP Warning: fclose(): supplied argument is not a valid stream resource in /var/www/html/weblog/xmlrpc.php on line 1189

comment:16 @anonymousbugger10 years ago

I tried rboren's patch, but it doesn't seem like I pinged Ping-o-Mation. Sending a trackback still worked. I didn't test receiving ping/trackbacks.

comment:17 @ryan10 years ago

My patch will only help with incoming pings.

comment:18 @klklaser10 years ago

According to Ping-o-Matic, I'm not receiving a successful pingback (error 33) or trackback (http 404), using customized permalinks. FYI, the server being used allows fopen.

Receiving and sending *backs works fine and always did without customized permalinks.

comment:19 @ryan10 years ago

When you use permalinks, what's your permalink strcuture. Perhaps url_to_postid() is not resolving the strcuture to a post id, thus the error 33.

comment:20 @klklaser10 years ago

/%postname%/%category%/

comment:21 @ryan10 years ago

url_to_postid() does not work for that structure. Revised url_to_postid() attached.

comment:22 @matt10 years ago

Ryan, would you mind committing that patch?

comment:23 @klklaser10 years ago

Rboren, The url_to_postid() change causes pingback receive errors. I feel

you're highly competent, and likely have already see these errors, still,
it's responsible to advise you of them. Disclaimer: I input the diff file

manually using notepad++, and that's subject to my error; I have to delete all
(-)'s and added all (+)'s, and basically proofread it carefully.

Pingback receive errors:
Error: Fault code -32700

Invalid argument supplied for foreach(), template-functions-category.php, line 129
Cannot modify header information - headers already sent template-functions-category.php:129, class-IXR.php lines 371 through 374.

<name>faultCode</name>
<value><int>33</int></value>

Full pingback receive errors available if needed. I can now fix this issue to my satisfaction, I just won't use the /%category%/ structure for the time being. This was my fault, I hadn't previously read of the Apache 2.x limitation for that particular permalink structure, our server is Apache 1.3.33.

Macmanx's issue is likely different from the problem I was experiencing.

edited on: 05-14-05 02:43

comment:25 @ryan10 years ago

klklaser, thanks. I updated get_category_children() so that it does not assume the category cache has already been setup.

comment:26 @klklaser10 years ago

Hi rboren, I have updated xmlrpc.php, functions.php, and template-functions-category.php with all the changes in the latest wp_remote_fopen.diff here and the two referenced changes at Trac. (of course I could have made a transcription error).

When using the structure /%postname%/%post_id%/, if I drill into a post as if to make a comment, the post text disappears. This does not happen without a customized structure. When I set the permalink structure to /%postname%/%category%/, post text is visible when drilled into a post. Good!

Test ping receive:

Error.

Fault code: 33 : The specified target URI cannot be used as a target. It either doesn't exist, or it is not a pingback-enabled resource.

POST /xmlrpc.php HTTP/1.0
Host: testblog.gaiastream.com
Content-Type: text/xml
User-Agent: The Incutio XML-RPC PHP Library -- RedAlt/Pingomation
Content-length: 404

<?xml version="1.0"?>
<methodCall>
<methodName>pingback.ping</methodName>
<params>
<param><value><array><data>

<value><string>http://redalt.com/pinged/http%3A%2F%2Ftestblog.gaiastream.com%2Fanother-new-series-of-tests%2Ftest%2F</string></value>
<value><string>http://testblog.gaiastream.com/another-new-series-of-tests/test/</string></value>

</data></array></value></param>
</params></methodCall>

<?xml version="1.0"?>
<methodResponse>
<fault>
<value>
<struct>
<member>
<name>faultCode</name>
<value><int>33</int></value>
</member>
<member>
<name>faultString</name>
<value><string>The specified target URI cannot be used as a target. It either doesn't exist, or it is not a pingback-enabled resource.</string></value>
</member>
</struct>
</value>
</fault>
</methodResponse>

It also doesn't receive a trackback, HTTP 404. I haven't made any further tests. Thoughts?

edited on: 05-14-05 22:14

comment:27 @macmanx10 years ago

I bet you guys couldn't wait for this to get more confusing? Guess what, it is! _

Notice my post that I made on May 10th: http://www.macmanx.com/wordpress/archives/2005/05/10/wordpress-v151-bugs/

In that post, I linked to one of Bryan's posts: http://blogged.btvillarin.com/2005/05/09/151/

Now, take a look at Bryan's post. He finally received my pingback today, on May 14th.

Now that is very confusing.

Either way, I've moved hosts for the last time and have applied last night's changes. I think my track and pingbacks are working as correctly as possible. Time will tell.

comment:28 @anonymousbugger10 years ago

I added the changes as well. Pingback to Ping-o-mation didn't work.

comment:29 @btvillarin10 years ago

I added the changes as well. Pingback to Ping-o-mation didn't work.

(Can you delete the previous note? That was me. Thanks.)

comment:30 @macmanx10 years ago

My pingback and trackback issues have been solved by revision 2606 of functions.php: http://trac.wordpress.org/file/trunk/wp-includes/functions.php?rev=2606

The ping-o-matic issue has once again been resolved on ping-o-matic's end.

comment:31 @mdawaffe10 years ago

I'm havig the same issue as klklaser regarding revision 2609

Shouldn't $homepath just be
$home_path = get_settings('home');

since $request_uri is the full uri?

Also, $pathinfo is never set.

And lastly, after changine $home_path as above, I can only ever ping one link at a time. Putting 3 links in a row in the content:
1st ping: succeeds
2nd: Fault code: -32700 : parse error. not well formed
3rd: Fault code: -32700 : parse error. not well formed

ReSaving the post:
1st ping: not reprocessed (good)
2nd: succeeds
3rd: Fault code: -32700 : parse error. not well formed

ReReSaving:
1st and 2nd: not reprocessed (good)
3rd succeeds.

EDIT: permalinks: /%year%/%monthnum%/%day%/%postname%/

edited on: 05-17-05 23:16

comment:32 @ryan10 years ago

http://trac.wordpress.org/changeset/2610

Fix for issues noted by mdawaffe.

comment:33 @mdawaffe10 years ago

Pings are now received (though I think it's now str_replacing the blog path twice - once from get_settings('home') and once from $home_path. Is $home_path even needed?).

However, I still have the "Fault code: -32700 : parse error. not well formed" error when pinging multiple links as mentioned above.

Does anyone else see this behavior?

comment:34 @ryan10 years ago

$home_path is just the path part of the 'home' setting. Stripping it is not necessary in this scenario since stripping 'home' will take care of it. However, if REQUEST_URI was passed in instead of a full URI, stripping $home_path would be useful. But, I'm not sure supporting this is worthwhile, so maybe we should just get rid of it and require fully qualified URIs.

comment:35 @mdawaffe10 years ago

There's some danger in the double stripping:

A person has a home setting http://www.example.com/blog, and a page with slug 'blog'. Pinging that page would strip 'http://www.example.com/blog/blog' to .

EDIT: Another example I had was just plain wrong

edited on: 05-18-05 01:29

comment:36 @ryan10 years ago

I'm seeing the same fault code with multiple links. Looking at pingback.log, I don't see any obvious problem with the sending side. According to xmlrpc.log, the receiving side receives all pings and resolves them to a post ID. Still looking.

comment:38 @mdawaffe10 years ago

rboren, Looks good with respect to double stripping. (Still get -32700s.)

comment:39 @ryan10 years ago

Are you sending multiple pings to the same site? If so, you will hit the comment flood check inside wp_new_comment(). The first ping will come through fine. All subsequent pings will not go through because they are within the comment flood interval. In this case, die() is called within wp_new_comment() which results in an undefined fault code (-32700) coming back to the pinger.

comment:40 @mdawaffe10 years ago

Ah. That's it exactly. I don't suppose the flood could whitelist pings coming from your own site? Don't know how useful that'd be in the 'real world', but that's the scenario I was testing.

comment:41 @macmanx10 years ago

Changeset 2612 is working beautifully, thanks Ryan!

comment:42 @klklaser10 years ago

Rev. 2612 seems to have helped quite a bit when using /%postname%/%category%/ ! Thanks rboren and mdawaffe! I'm still having problems receiving a trackback.

1) Upon sending a trackback from RedAlt, HTTP/1.1 404 Not Found.
2) Clicking on the trackback link at the bottom of the post text results in “Error 404 - Not Found”, odd behavior that doesn't happen with some other structures. For example, try clicking: http://testblog.gaiastream.com/rev-2612-retest-of-trackback-receive/test/trackback/

Seems like these two issues might/would be related.

edited on: 05-18-05 19:53

comment:43 @tlongren10 years ago

I did "svn update" on my local trunk to update to 2612. Before updating to the 2612 changes I could send trackbacks fine. Now I can't seem to send trackbacks at all. If I send a trackback on the initial post, and then go back and "manage" that post, the trackback URI will still be listed in the "Send Trackbacks To:" field...

So the 2612 changes broke the ability to send trackbacks for me...

edited on: 05-18-05 20:40

comment:44 @ryan10 years ago

You can track backing down to 2611. I don't have any trackback problems with 2612. 2612 introduced a fix to prevent attempting to trackback when the "Send trackbacks to:" field is empty.

comment:45 @tlongren10 years ago

rboren, my "send trackbacks to" field is not empty. I reverted back to revision 2611 and I still get the same exact behavior. I'm not sure which revision I was running previously, but it worked great.

Like I said, after doing an "svn update" this afternoon, the ability to "Send trackbacks to" stopped working. When I go to manage a post that had a value in "Send Trackback To", the trackback URI is still shown in that form field. Like WP knows it wasn't able to trackback successfully and is storing the value for later attempts maybe?

comment:46 @dedge10 years ago

Just to throw in another experience:
Trackbacks & pings received (including internally, post-to-post)
Trackbacks & pings not sent

I've tried 2611 & 2612. Is this related or a different issue altogether?

Also if it's of any interest, at one point (1.5.1) I was not receiving pingbacks (including internally) and resolved that by removing the Bad Post ID plugin.

EDIT: and yes, I enabled the "Attempt to notify..." option

edited on: 05-19-05 01:16

@macmanx10 years ago

comment:47 @Nazgul9 years ago

  • Resolution set to worksforme
  • Status changed from new to closed

This works for me.

Note: See TracTickets for help on using tickets.