Make WordPress Core

Opened 7 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:

Description

Hello.

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/2
http://wp-test.ru/category/bez-rubriki/page/3 (current page)
.....

Attachments (1)

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

Download all attachments as: .zip

Change History (5)

#1 @SergeyBiryukov
7 years ago

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

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

@soulseekah
7 years ago

Prototype fix. Comments needed.

#3 @soulseekah
7 years ago

Attached a fix that seemingly works.

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

Thoughts?

#4 @alaing
3 years ago

Hello, any news ? Thanks :)

Note: See TracTickets for help on using tickets.