WordPress.org

Make WordPress Core

Opened 15 months ago

Last modified 12 months 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:

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 12 months ago.
Prototype fix. Comments needed.

Download all attachments as: .zip

Change History (4)

#1 @SergeyBiryukov
14 months ago

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

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

@soulseekah
12 months ago

Prototype fix. Comments needed.

#3 @soulseekah
12 months ago

Attached a fix that seemingly works.

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

Thoughts?

Note: See TracTickets for help on using tickets.