[wp-trac] [WordPress Trac] #53476: Pagination not working correctly for certain URL taxonomy

WordPress Trac noreply at wordpress.org
Tue Jun 22 04:33:27 UTC 2021


#53476: Pagination not working correctly for certain URL taxonomy
--------------------------+-----------------------------
 Reporter:  defpripub     |      Owner:  (none)
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  Awaiting Review
Component:  General       |    Version:  5.7.2
 Severity:  major         |   Keywords:
  Focuses:                |
--------------------------+-----------------------------
 I have a Django/Python custom built CMS that I'm trying to migrate over to
 WordPress.  Everything has been going smoothly except that pagination is
 broken for my blog.  Here is the key information:

 1. I installed a WordPress droplet on Digital Ocean and then updated it to
 the latest release 5.7.2
 2. The url scheme of the blog on my old side follows the pattern
 `site.com/blog/<slug>`.  E.g. `site.com/blog/first-post`, `site.com/blog
 /php-tricks`
 3. I migrated each post from my old site to the new WordPress installation
 as a "post", and put it under the category of `blog`
 4. In the WordPress admin, I went to "Settings > Permalink" and changed
 the URL taxonomy to be `/%category%/%postname%`, so that it would match my
 old site.
 5. When going to `wp-site.com/blog` I see the 5 most recent entries.  At
 the bottom of the page, my template is using the function
 `get_next_posts_link()` to generate the pagination link, which is
 `/blog/page/2`.  Which is what I expect.
 6. The oldest blog post is entitled "Pages Section Added", which has a
 slug of `/blog/pages-section-added`.

 Here's where the issue is:  When I click on the `/blog/page/2` link, It's
 not sending me to see the next 5 most recent entries, It's doing a 303 (?)
 Redirect and sending my to `/blog/pages-section-added`.  If I try
 something like `/blog/page/8`, it also sends me to that old blog post.

 When I went back to Settings > Permalink, and changed the taxonomy to only
 be `/%category%`, pagination worked as expected when visiting
 `/blog/page/2`.  But because of this, I can't access any single page blog
 posts.

 I think this is a bug.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/53476>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list