The pingback mechanism is the same for both posts and pages. There’s no reason one should work but not the other.
Yes, but unfortunately I am actually experiencing that. Also, when I’m testing with local installations and pinging from a WP1.5.2 blog to my 2.0.5 blog it works on posts only but not on pages.
I could isolate it, the postID representation cannot be retrieved from the permalink by the function url_to_postid() (is being called in the xmlrpc.php), 0 is being returned 🙁
That means url_to_postid() fails in case of my pages’ permalinks.
I will try to fix it although I’m not very familiar with regex.
WP 2.0.5, includes/functions.php
Line 258
Replace ” }” with the following code:
} else {
// No match, but let's get the id if we're having a page.
// since the above method fails in some cases for some reasons.
// Quick and dirty, I know.
// by Michael Wöhrer, http://sw-guide.de
$query_pages = 'pagename=' . $request;
$query = new WP_Query($query_pages);
if ( $query->is_page )
return $query->post->ID;
else
return 0;
}
Works on my local installation & I’ve just uploaded it to my blog’s ftp.
I’ve the same problem.
Your code is not up to date but thank you to have directed me.
url_to_postid() NOT work with static page url in the last stable version.
Solution for latest WordPress version 2.1.3 is:
Open /wp-includes/rewrite.php
, goto line #143 and replace
return 0;
with the following code:
$query = new WP_Query('pagename=' . $request);
if ( $query->is_page )
return $query->post->ID;
return 0;
I’ve just opened a ticket: http://trac.wordpress.org/ticket/4103
thank you to have opened a ticket.
for find post_id of an url with the actual version, I tested :
$id = url_to_postid($url);
if(!$id){
$pages = preg_replace('#^.+/([^/]+)/*$#','$1',$url);
$query = new WP_Query('pagename='.$pages);
if($query->is_page) $id = $query->post->ID;
}
that work on me and, I think, for others installations.