[wp-trac] [WordPress Trac] #21682: Rewrite endpoints are lost if a custom category or tag base is defined

WordPress Trac noreply at wordpress.org
Fri Nov 13 02:20:17 UTC 2015


#21682: Rewrite endpoints are lost if a custom category or tag base is defined
-------------------------------------------------+-------------------------
 Reporter:  sanchothefat                         |       Owner:
     Type:  defect (bug)                         |  DrewAPicture
 Priority:  normal                               |      Status:  reviewing
Component:  Rewrite Rules                        |   Milestone:  Future
 Severity:  normal                               |  Release
 Keywords:  dev-feedback has-patch needs-        |     Version:  3.4
  refresh                                        |  Resolution:
                                                 |     Focuses:
-------------------------------------------------+-------------------------

Comment (by ninnypants):

 21682.3.diff fixes the issues with the `oldSlugRedirect.php` tests by
 making sure items in the `$endpoints` array are unique fixing the issues
 with the endpoint slug being appended to generated urls multiple times.

 The test that failed in `addRewriteEndpoint.php` looks like it was relying
 on this bug to pass. The previously added endpoint of foo
 `add_rewrite_endpoint( 'foo', EP_ALL, true );` being higher up in the
 generated rewrite rules array causing it to match when the endpoint in the
 test was `http://example.org/page_endpoint/foo/` like it would with a
 normal url. Changing the test url to
 `http://example.org/page_endpoint/baz/` allows the test to pass without
 other endpoints interfering.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/21682#comment:12>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list