[wp-trac] [WordPress Trac] #4103: Pingbacks don't always work on
(sub) pages // error in function url_to_postid
WordPress Trac
wp-trac at lists.automattic.com
Fri Apr 6 16:43:40 GMT 2007
#4103: Pingbacks don't always work on (sub) pages // error in function
url_to_postid
----------------------+-----------------------------------------------------
Reporter: Michael_ | Owner: anonymous
Type: defect | Status: new
Priority: normal | Milestone:
Component: General | Version: 2.1.3
Severity: normal | Keywords:
----------------------+-----------------------------------------------------
Pingbacks do not always work on pages. A pingback to ''site.com/test-
page-1/'' does work however e.g. a pingback to http://sw-
guide.de/wordpress/wordpress-plugins/simple-tagging-plugin/ does not work.
I could duplicate this issue several times using different sub pages.
I've found out that the url_to_postid() causes this problem.
Solution for WP 2.1.3: go to ''/wp-includes/rewrite.php'', line # 143 and
replace
{{{
return 0;
}}}
with
{{{
$query = new WP_Query('pagename=' . $request);
if ( $query->is_page )
return $query->post->ID;
return 0;
}}}
See also [http://wordpress.org/support/topic/97033 wordpress.org forum
post].
--
Ticket URL: <http://trac.wordpress.org/ticket/4103>
WordPress Trac <http://trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list