Opened 5 years ago
Last modified 5 years ago
#47813 new defect (bug)
permalinks broken when article name is numeric(if the post id above 1000)
Reported by: | guigmonteiro | Owned by: | |
---|---|---|---|
Milestone: | Awaiting Review | Priority: | normal |
Severity: | normal | Version: | 5.2.2 |
Component: | Permalinks | Keywords: | reporter-feedback |
Focuses: | Cc: |
Description
This is a follow-up to #5305.
The problem on ticket #5305 stil happens if the post have the id above 1000
Steps to reproduce:
Create a post without title(it shout have the id above 1000)
Change the permalink structure to post name (/%postname%/)
Click on the post permalink and try view it
it sends back to the archive page of the post_type instead of the single page of the post
Note: See
TracTickets for help on using
tickets.
Hi @guigmonteiro, welcome to WordPress Trac! Thanks for the report.
To clarify a bit, #5305 addressed the issue from two points:
/%postname%/
.)Changing the permalink structure after a post with a 4-digit numeric slug is already created seems a bit like an edge case, but [32648] should still account for that.
In my testing, I could not reproduce the issue on a clean install so far. My steps:
/%postname/
, e.g./archives/%post_id%
.1864
./%postname%/
.single.php
template, not the archive page).Debug Bar plugin shows:
So wp_resolve_numeric_slug_conflicts() seems to work as expected for me, correctly rewriting the date query (
year=1864
) to a post query (name=1864
).Could you share the ID of the post that doesn't work for you, and the date it was published?