Make WordPress Core

Opened 4 years ago

Last modified 5 weeks 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 3 years ago.
Prototype fix. Comments needed.

Download all attachments as: .zip

Change History (5)

#1 @SergeyBiryukov
4 years ago

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

#2 @Kubitomakita
3 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 Previous 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.

Last edited 3 years ago by Kubitomakita (previous) (diff)

3 years ago

Prototype fix. Comments needed.

#3 @soulseekah
3 years ago

Attached a fix that seemingly works.

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


#4 @alaing
5 weeks ago

Hello, any news ? Thanks :)

Note: See TracTickets for help on using tickets.