[wp-trac] [WordPress Trac] #61393: Trailing Slash Issue in Category Pagination URLs with the_posts_pagination()
WordPress Trac
noreply at wordpress.org
Tue Mar 25 21:05:23 UTC 2025
#61393: Trailing Slash Issue in Category Pagination URLs with
the_posts_pagination()
-------------------------------------------------+-------------------------
Reporter: hmbashar | Owner: audrasjb
Type: defect (bug) | Status: reopened
Priority: normal | Milestone: 6.9
Component: Permalinks | Version:
Severity: normal | Resolution:
Keywords: has-screenshots has-testing-info | Focuses:
needs-patch needs-unit-tests |
-------------------------------------------------+-------------------------
Changes (by peterwilsoncc):
* keywords:
has-screenshots has-patch has-testing-info needs-testing has-unit-
tests good-first-bug reporter-feedback
=> has-screenshots has-testing-info needs-patch needs-unit-tests
* status: closed => reopened
* resolution: fixed =>
* milestone: 6.8 => 6.9
Comment:
Reopening this as the commit was reverted in [60088] due to a bug reported
in #63123.
I think the change that is required is to modify the default `base` and
`format` arguments to account for permalink settings.
If the permalinks do not include trailing slashes, the base should be of
the form `example.com/category/cateogory-slug%_%` and the format include a
leading slash.
If permalinks do include a trailing slash, the base should be of the form
`example.com/category/cateogory-slug/%_%` and the format not include the
trailing slash.
Modifying the defaults in this way will allow developers to pass a custom
base and format and have them remain backward compatible.
The unit tests for the functions should use `$this->goto()` to allow for
testing of the defaults.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/61393#comment:25>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list