Make WordPress Core

Opened 3 years ago

Last modified 2 years ago

#43789 new defect (bug)

the_posts_pagination() outputs the slash at the first link

Reported by: campusboy1987 Owned by:
Milestone: Future Release Priority: normal
Severity: normal Version: 4.9.5
Component: Permalinks Keywords: needs-patch needs-unit-tests
Focuses: Cc:



Permanent link settings: http://wp-test.ru/%postname% (without a slash on the end)

On the second and other pages of pagination, any category has a link to the first page with a slash on the end.

http://wp-test.ru/category/bez-rubriki/ (with a slash on the end, why?)
http://wp-test.ru/category/bez-rubriki/page/3 (current page)

Attachments (1)

43789.diff (2.1 KB) - added by soulseekah 2 years ago.
Prototype fix. Comments needed.

Download all attachments as: .zip

Change History (4)

#1 @SergeyBiryukov
3 years ago

  • Keywords needs-patch needs-unit-tests added
  • Milestone changed from Awaiting Review to Future Release

#2 @Kubitomakita
2 years ago

I can confirm this issue. When you have pagination on category archive with at least two pages and you go to the second page, the prev and 1 links have the trailing slash.

Bug shouldn't be very deep as the View link in wp-admin in categories shows the url without trailing slash.

Version 0, edited 2 years ago by Kubitomakita (next)

2 years ago

Prototype fix. Comments needed.

#3 @soulseekah
2 years ago

Attached a fix that seemingly works.

What are the edge cases? Paginated loops inside shortcodes inserted in posts displayed on date archives?


Note: See TracTickets for help on using tickets.