Ticket #2197 (closed defect: fixed)

Opened 3 years ago

Last modified 2 years ago

Cannot send trackbacks with 2.0

Reported by: citeewurkor Assigned to: skeltoac
Priority: high Milestone:
Component: General Version: 2.0
Severity: blocker Keywords: trackbacks
Cc:

Description

Please reference this thread http://wordpress.org/support/topic/54145?replies=32 We can receive trackbacks from 1.5 blogs, though. This is my first trac ticket, so forgive me if I haven't done it correctly.

Attachments

execute-pings.php (1.0 kB) - added by skeltoac on 01/19/06 00:00:48.
Removes all output from script, simplifies procedure, refines tb query
cgi-ping.diff (1.2 kB) - added by skeltoac on 01/19/06 01:25:42.
Reinstates iframe for CGI users.
tb_cgi.diff (0.8 kB) - added by skeltoac on 01/28/06 20:21:05.
Don't print php functions.

Change History

01/02/06 01:17:57 changed by citeewurkor

  • status changed from new to closed.
  • resolution set to worksforme.

nevermind, I should have submitted this in the wordpress bug system. my bad..

01/02/06 01:19:06 changed by citeewurkor

  • status changed from closed to reopened.
  • resolution deleted.

sigh.. the bug system link I found links to the trac system.

01/02/06 14:51:48 changed by Viper007Bond

  • keywords changed from send trackbacks to trackbacks.
  • severity changed from major to critical.
  • milestone deleted.

Yeah, this is the bug tracker. ;)

And trackbacks are screwed up horribly, both sending and also recieving it seems. Pingbacks appear to be fine however.

01/03/06 05:25:32 changed by makemead

Here is the response I got from my hosting company: The servers do block outgoing icmp connections to prevent malicious scripts and users from running ping floods from the servers. When you say pings, do you refer to the actual pings or a call to a remote script on the other server?

Does wordpress 2.0 use icmp?

01/03/06 21:01:14 changed by makemead

As opposed to Viper007Bond's issue I can receive trackbacks just fine. Sending is 100% no go.

01/04/06 08:41:47 changed by makemead

New development. Pings will work if you execute execute_all_pings()

Go to www.yourpage.com/wp-admin/execute-pings.php

It is obviously not being called in the script somewhere

01/04/06 09:13:37 changed by makemead

  • status changed from reopened to closed.
  • resolution set to worksforme.

I added the following:

require_once('execute-pings.php');
execute_all_pings();

before these last two lines at the end of post.php

include('admin-footer.php');
?>

This is a temporary fix. I do not know if it causes any other concerns but testing it seems to fix the trackback issue.

01/04/06 09:57:14 changed by makemead

  • status changed from closed to reopened.
  • resolution deleted.

Using that technique you can either trackback or pingback but not both. If you try using both then neither works.

01/04/06 20:48:34 changed by Steph

execute-pings.php will spit out the number of a post which has a blank space in the trackback field. That seems to block outgoing trackbacks. If it's just a couple of posts you can edit them to remove the space, but if it's tons of posts (like in my case) your SOL.

01/04/06 21:04:25 changed by makemead

There are no spaces in my to_ping field. I've even tried to delete the row and recreate it to no avail. This is an issue with some but is not the case here. :)

01/04/06 21:10:01 changed by makemead

I am going to try to make the "View site" link in the admin panel go to execute-pings.php and then redirect to the home page and see if that helps. :)

01/04/06 21:13:08 changed by Steph

Temporary fix for geeks: run this query:

UPDATE wp_posts SET to_ping = WHERE to_ping LIKE '\n';

(don't forget to change wp_posts to whatever your post table is; load wp-admin/execute-pings.php: if it lists post ids, you need to try harder -- using '\n\n', then '\n\n\n', etc... worked for me. You might also want to replace '\n' by ' ' or even '\r' if it doesn't seem to work, or combinations)

01/04/06 21:16:12 changed by Steph

Previous mod I forgot to post after previewing. For me, all outgoing trackbacks are blocked because some of my posts contain whitespace in the to_ping field. Removing it manually (after identifying posts by loading wp-admin/execute-pings.php and getting the post ID from there) will work if you only have 3-4 faulty posts. In my case, it's over 50, so the SQL query hack above is my "only hope". Still haven't got through all my problematic posts, though.

01/04/06 21:25:45 changed by Steph

FWIW, people are having trouble pinging my blog too (from a 1.5.2 install to my 2.0 one)

01/04/06 21:29:15 changed by Steph

That SQL query up there isn't correct, the disappeared when posting (that is, a quote, no space, another quote, in case it disappears again).

so to_ping = quote quote with no space in between.

01/04/06 21:52:32 changed by ringmaster

Is this useful to use in execute-pings.php to replace the current query for trackbacks:

SELECT ID FROM $wpdb->posts WHERE TRIM(to_ping) != '' 
AND length(TRIM(to_ping)) > 7 AND post_status != 'draft'

01/05/06 03:02:57 changed by citeewurkor

is that line 22 between the parenthesis? I'll give it a shot.

01/05/06 03:14:20 changed by citeewurkor

ringmaster, I tried, and the effect is the same.

01/05/06 12:16:12 changed by makemead

The problem isn't with execute-pings.php because trackbacks work when you execute that page. The problem is it is not being called properly elsewhere. Somehow it is being skipped when it is needed.

01/05/06 23:00:42 changed by Coin

No trackbacks don“t allways work using this execute-pings.php . The "Do Trackback" loop returns rows with empty to_post, i can't see why. After "update wp1_posts set to_post=NULL Where ID=..." it works fine. So i think do_trackback fails do empty to_post correctly and execute-pings.php can't handle this problem.

01/06/06 01:26:28 changed by ryan

  • milestone set to 2.0.1.

01/06/06 01:46:08 changed by ryan

See #2170

01/06/06 03:25:00 changed by makemead

Yes, #2170 has been brought up before. It's a no go. :)

01/07/06 06:37:09 changed by ryan

I know. That's my way of tracking relationships.

01/07/06 12:12:06 changed by davidhouse

Is this fixed now? 2170 is fixed. Was this a dupe of 2170 or just related to it?

01/08/06 04:07:09 changed by makemead

No, it is not fixed. This is not related to 2170.

01/11/06 13:14:30 changed by makemead

  • status changed from reopened to closed.
  • resolution set to worksforme.

I think I'm onto something.

Add execute_all_pings(); near the end of execute-pings.php {{{

do_trackbacks($trackback->ID);

}

}

} execute_all_pings(); _e('Done.');

?>}}}

For some reason it was not being called. Seems to work for me. Please test and report.

01/11/06 13:16:50 changed by makemead

Sorry, looks like the preformatted text brackets didn't work because of the brackets in the code. Oops. :(

01/11/06 13:48:28 changed by makemead

  • status changed from closed to reopened.
  • resolution deleted.

Above does not work if you have a pingback AND a trackback. If you do, only the pingback gets sent.

01/17/06 08:02:19 changed by skeltoac

  • owner changed from anonymous to skeltoac.
  • status changed from reopened to new.
  • severity changed from critical to major.

01/18/06 12:50:56 changed by makemead

I would consider this a "critical" bug and not just "major" due to the fact that WP2.0 is useless without the ability to trackback.

01/18/06 19:42:14 changed by skeltoac

Mark, don't you realize that this works for the majority of people and we're never going to fix YOUR bug if you don't help? You said someone could log into your server to research the problem. I offered to do it. No response from you. What gives?

Don't let this get closed as "works for me" again.

01/18/06 23:59:49 changed by skeltoac

Thanks to makemead (Mark), I have found the cause: PHP as CGI (on Site5 at least) has a limited socket stacking capability. fsockopen to a local url works fine until the called script sends output, at which time the script dies.

01/19/06 00:00:48 changed by skeltoac

  • attachment execute-pings.php added.

Removes all output from script, simplifies procedure, refines tb query

01/19/06 00:03:43 changed by ryan

01/19/06 01:25:42 changed by skeltoac

  • attachment cgi-ping.diff added.

Reinstates iframe for CGI users.

01/25/06 03:47:21 changed by ryan

With the exception of self-pings on CGI hosts, I think we've got it. Self-pings can wait for later.

01/25/06 04:12:49 changed by ryan

  • status changed from new to closed.
  • resolution set to fixed.

01/26/06 16:44:53 changed by makemead

Can you explain how I could identify my host as one that uses php as cgi as opposed to what, a pure php server?

01/28/06 15:57:54 changed by masquerade

  • status changed from closed to reopened.
  • resolution deleted.

Still broken for PHP as CGI, skeltoac's patch is meant to fix this.

01/28/06 16:00:05 changed by davidhouse

  • severity changed from major to blocker.

Needs to be fixed before 2.0.1.

01/28/06 18:41:25 changed by ryan

  • status changed from reopened to closed.
  • resolution set to fixed.

(In [3491]) CGI ping fixes. fixes #2197

01/28/06 20:20:42 changed by skeltoac

  • status changed from closed to reopened.
  • resolution deleted.

Fix the fix.

01/28/06 20:21:05 changed by skeltoac

  • attachment tb_cgi.diff added.

Don't print php functions.

01/29/06 00:12:17 changed by ryan

  • status changed from reopened to closed.
  • resolution set to fixed.

(In [3492]) TB fix. fixes #2197

11/30/06 19:41:49 changed by

  • milestone deleted.

Milestone 2.0.1 deleted