[wp-trac] [WordPress Trac] #50926: Page 2 onwards of any wp-sitemap.xml URL will result in a 404 redirect

WordPress Trac noreply at wordpress.org
Wed Aug 12 06:57:54 UTC 2020


#50926: Page 2 onwards of any wp-sitemap.xml URL will result in a 404 redirect
--------------------------+------------------------------
 Reporter:  GamerZ        |       Owner:  (none)
     Type:  defect (bug)  |      Status:  new
 Priority:  normal        |   Milestone:  Awaiting Review
Component:  Sitemaps      |     Version:
 Severity:  normal        |  Resolution:
 Keywords:                |     Focuses:
--------------------------+------------------------------

Comment (by GamerZ):

 Works: https://lesterchan.net/wp-sitemap-posts-post-1.xml
 Broken: https://lesterchan.net/wp-sitemap-posts-post-2.xml

 Works: https://lesterchan.net/wp-sitemap-taxonomies-post_tag-1.xml
 Broken:https://lesterchan.net/wp-sitemap-taxonomies-post_tag-2.xml

 Replying to [ticket:50926 GamerZ]:
 > Works: https://lesterchan.net/wp-sitemap-posts-page-1.xml
 > Broken: https://lesterchan.net/wp-sitemap-posts-page-2.xml
 >
 > Notice that the broken URL is redirected to https://lesterchan.net/wp-
 sitemap-posts-page-2.xml/page/2
 >
 > I suspect it is due to Line 475 to Line 477 of wp-includes/canonical.php
 >
 > As after removing the lines it works
 > {{{#!php
 > <?php
 > if ( $paged > 1 ) {
 >     $addl_path .= user_trailingslashit(
 "$wp_rewrite->pagination_base/$paged", 'paged' );
 > }
 > }}}

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


More information about the wp-trac mailing list