[wp-trac] [WordPress Trac] #50910: 5.5 Sitemap URLs are incorrectly paginated

WordPress Trac noreply at wordpress.org
Wed Aug 26 03:49:51 UTC 2020


#50910: 5.5 Sitemap URLs are incorrectly paginated
-------------------------------------------------+-------------------------
 Reporter:  jonathanstegall                      |       Owner:
                                                 |  SergeyBiryukov
     Type:  defect (bug)                         |      Status:  accepted
 Priority:  normal                               |   Milestone:  5.5.1
Component:  Sitemaps                             |     Version:  5.5
 Severity:  normal                               |  Resolution:
 Keywords:  has-patch has-unit-tests needs-      |     Focuses:
  testing                                        |
-------------------------------------------------+-------------------------

Comment (by peterwilsoncc):

 > 1. that change is not needed the fix ''this'' problem
 > 2. the way the unit tests are now structured, that change isn't need
 when running the unit tests

 Makes perfect sense on both accounts.

 I've replaced my PR with your code, so I can get a full test run going.

 While reviewing your code:
 * I found some repeated code in the `redirect_canonical()` block, you had
 `if sitemaps, elseif paged or other stuff, elseif sitemaps`. I've removed
 the repetition in the pull request.
 * I also added some canonical tests for ugly permalinks to ensure the
 sitemaps don't attempt to redirect when pretty permalinks are enabled.

 The [https://github.com/WordPress/wordpress-develop/pull/482 full pull
 request in #482] with your code, my tests.  The changes I've made are in
 [https://github.com/WordPress/wordpress-
 develop/pull/482/commits/361e4e368f3cf922e4eb330fe95745d2724ebf2a this
 commit].

 I am still waiting for the unit tests to complete on the PR, once they're
 done I'll upload a new patch and I think it's good to go.

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


More information about the wp-trac mailing list