[wp-trac] [WordPress Trac] #2877: A Slash too much @ get_pagenum_link()
WordPress Trac
noreply at wordpress.org
Mon Oct 9 22:09:26 UTC 2023
#2877: A Slash too much @ get_pagenum_link()
-------------------------------------------------+-------------------------
Reporter: dave@… | Owner: petitphp
Type: defect (bug) | Status: assigned
Priority: normal | Milestone: 6.4
Component: Posts, Post Types | Version: 2.0
Severity: normal | Resolution:
Keywords: has-patch needs-testing has-unit- | Focuses: template
tests has-testing-info |
-------------------------------------------------+-------------------------
Comment (by petitphp):
@tejwanihemant, @webtechpooja, thanks for the test report.
The reason you didn't get the trailing slash in the URL in your testing is
because WordPress has redirected you to the correct URL.
This is the purpose of this patch,
Looking at the network tab in the browser devtools you should see a
redirect without the patch and no redirect with the patch.
**Before**, going back to the first page trigger a redirect
{{{
200 : localhost/2023 <-- on the first page
200 : localhost/2023/2 <-- going to the second page
301 : localhost/2023/ <-- going back the first page
200 : localhost/2023 <-- user is redirected to the correct URL
without trailing slash
}}}
**After**, going back to the first page directly
{{{
200 : localhost/2023 <-- on the first page
200 : localhost/2023/2 <-- going to the second page
200 : localhost/2023 <-- going back the first page (no redirect)
}}}
See the attached screenshot for an example.
@nicolefurlan I can still reproduce the issue on trunk, and patch fix the
issue.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/2877#comment:34>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list