Make WordPress Core

Opened 21 years ago

Closed 21 years ago

Last modified 20 years ago

#2197 closed defect (bug) (fixed)

Cannot send trackbacks with 2.0

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

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 (3)

execute-pings.php​ (1.0 KB ) - added by skeltoac 21 years ago.
Removes all output from script, simplifies procedure, refines tb query
cgi-ping.diff​ (1.2 KB ) - added by skeltoac 21 years ago.
Reinstates iframe for CGI users.
tb_cgi.diff​ (863 bytes ) - added by skeltoac 21 years ago.
Don't print php functions.

Download all attachments as: .zip

Change History (46)

#1 @citeewurkor
21 years ago

  • Resolution → worksforme
  • Status new → closed

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

#2 @citeewurkor
21 years ago

  • Resolution worksforme
  • Status closed → reopened

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

#3 @Viper007Bond
21 years ago

  • Keywords send removed
  • Milestone 2.0
  • Severity major → critical

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.

#4 @makemead
21 years ago

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?

#5 @makemead
21 years ago

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

#6 @makemead
21 years ago

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

#7 @makemead
21 years ago

  • Resolution → worksforme
  • Status reopened → closed

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.

#8 @makemead
21 years ago

  • Resolution worksforme
  • Status closed → reopened

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

#9 @Steph
21 years ago

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.

#10 @makemead
21 years ago

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

#11 @makemead
21 years ago

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

#12 @Steph
21 years ago

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)

#13 @Steph
21 years ago

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.

#14 @Steph
21 years ago

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

#15 @Steph
21 years ago

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.

#16 @ringmaster
21 years ago

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'

#17 @citeewurkor
21 years ago

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

#18 @citeewurkor
21 years ago

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

#19 @makemead
21 years ago

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.

#20 @Coin
21 years ago

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.

#21 @ryan
21 years ago

  • Milestone → 2.0.1

#23 @makemead
21 years ago

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

#24 @ryan
21 years ago

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

#25 @davidhouse
21 years ago

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

#26 @makemead
21 years ago

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

#27 @makemead
21 years ago

  • Resolution → worksforme
  • Status reopened → closed

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.

#28 @makemead
21 years ago

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

#29 @makemead
21 years ago

  • Resolution worksforme
  • Status closed → reopened

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

#30 @skeltoac
21 years ago

  • Owner changed from anonymous to skeltoac
  • Severity critical → major
  • Status reopened → new

#31 @makemead
21 years ago

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.

#32 @skeltoac
21 years ago

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.

#33 @skeltoac
21 years ago

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.

@skeltoac
21 years ago

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

@skeltoac
21 years ago

Reinstates iframe for CGI users.

#35 @ryan
21 years ago

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

#36 @ryan
21 years ago

  • Resolution → fixed
  • Status new → closed

#37 @makemead
21 years ago

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

#38 @masquerade
21 years ago

  • Resolution fixed
  • Status closed → reopened

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

#39 @davidhouse
21 years ago

  • Severity major → blocker

Needs to be fixed before 2.0.1.

#40 @ryan
21 years ago

  • Resolution → fixed
  • Status reopened → closed

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

#41 @skeltoac
21 years ago

  • Resolution fixed
  • Status closed → reopened

Fix the fix.

@skeltoac
21 years ago

Don't print php functions.

#42 @ryan
21 years ago

  • Resolution → fixed
  • Status reopened → closed

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

#43 @(none)
20 years ago

  • Milestone 2.0.1

Milestone 2.0.1 deleted

Note: See TracTickets for help on using tickets.