[wp-trac] [WordPress Trac] #25136: url_to_postid() fails but get_page_by_path() works, on a Woocommerce page

WordPress Trac noreply at wordpress.org
Sun Aug 25 00:21:04 UTC 2013


#25136: url_to_postid() fails but get_page_by_path() works, on a Woocommerce page
--------------------------+-----------------------------
 Reporter:  adiant        |      Owner:
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  Awaiting Review
Component:  General       |    Version:  3.6
 Severity:  normal        |   Keywords:
--------------------------+-----------------------------
 For at least one of the pages that the Woocommerce plugin creates, at
 /shop/, url_to_postid() returns a zero, yet get_page_by_path() works.

 Attached file shows the var_dump of the output of the two functions, and
 the php source that created the output.  The results are identical when
 Permalinks either default (?p=123) or are set to /%postname%/

 Because my Plugin's user who reported this, and the test shown here, both
 were on localhost (Mac and Win 8) installs, I just repeated this test on
 commercial Linux-based web hosting, and got the same results, with both
 default (?p=123) and /%postname%/ Permalinks.

--
Ticket URL: <http://core.trac.wordpress.org/ticket/25136>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list