Make WordPress Core

Opened 6 years ago

Last modified 3 years ago

#43789 new defect (bug)

the_posts_pagination() outputs the slash at the first link

Reported by: campusboy1987's profile 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: (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. (with a slash on the end, why?) (current page)

Attachments (1)

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

Download all attachments as: .zip

Change History (5)

#1 @SergeyBiryukov
6 years ago

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

#2 @Kubitomakita
6 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 6 years ago by Kubitomakita (previous) (diff)

6 years ago

Prototype fix. Comments needed.

#3 @soulseekah
6 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
3 years ago

Hello, any news ? Thanks :)

Note: See TracTickets for help on using tickets.