Ticket #2197 (closed defect (bug): fixed)

Opened 6 years ago

Last modified 5 years ago

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:

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 Download (1.0 KB) - added by skeltoac 6 years ago.
Removes all output from script, simplifies procedure, refines tb query
cgi-ping.diff Download (1.2 KB) - added by skeltoac 6 years ago.
Reinstates iframe for CGI users.
tb_cgi.diff Download (863 bytes) - added by skeltoac 6 years ago.
Don't print php functions.

Change History

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

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

  • Status changed from closed to reopened
  • Resolution worksforme deleted

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

  • Keywords send removed
  • Severity changed from major to critical
  • Milestone 2.0 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.

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?

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

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

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

  • Status changed from closed to reopened
  • Resolution worksforme deleted

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

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.

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

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

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)

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.

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

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.

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'

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

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

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.

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.

  • Milestone set to 2.0.1

See #2170

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

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

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

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

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

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

  • Status changed from closed to reopened
  • Resolution worksforme deleted

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

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

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.

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.

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.

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

Reinstates iframe for CGI users.

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

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

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

  • Status changed from closed to reopened
  • Resolution fixed deleted

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

  • Severity changed from major to blocker

Needs to be fixed before 2.0.1.

  • Status changed from reopened to closed
  • Resolution set to fixed

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

  • Status changed from closed to reopened
  • Resolution fixed deleted

Fix the fix.

Don't print php functions.

  • Status changed from reopened to closed
  • Resolution set to fixed

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

  • Milestone 2.0.1 deleted

Milestone 2.0.1 deleted

Note: See TracTickets for help on using tickets.