Opened 10 years ago
Closed 10 years ago
#31009 closed defect (bug) (duplicate)
Posttitle is the same as the ID of the chosen homepage bug
Reported by: | EmeryFramboise | Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | 4.1 |
Component: | Permalinks | Keywords: | |
Focuses: | Cc: |
Description
Hi,
I ran in to a problem which I think is in the WP core.
I'm adding pages with the posttitle '1', '2', '3', et cetera (primary school classes). I saw that the only page that does not work is the page that has the same posttitle as the ID of the homepage.
The ID of the page that I chose as 'home', is 5. When I add a page with a posttitle '5', the homepage template gets loaded instead of the chosen template for my page. When I change my posttitle to any other page id this does not happen. Very weird behaviour.
Change History (4)
#1
in reply to:
↑ description
@
10 years ago
#2
@
10 years ago
- Component changed from General to Permalinks
- Keywords reporter-feedback added
Hi @EmeryFramboise, welcome to Trac!
This definitely sounds like a duplicate of a known issue with integer-based permalinks, #5305. Can you confirm whether your other pages work with numbers as the titles?
#3
@
10 years ago
Other posts and pages work with a numeric title. The page or post that loads wrongly is the one that has the same posttitle / permalink as the ID of the homepage you've chosen as a static frontpage. It doesn't happen that often because the ID vary pretty much but in my case the page that I chose as home had #ID 5. And in this example I also had a page with permalink / title '5'.
I solved the issue for myself by making a new page that I chose to be my frontpage, because I knew it upped the ID on that one and probably did not came in the range of posttitle numbers. Which worked correctly as I only have 1-8 as pagetitles and my new page has 1052.
Replying to EmeryFramboise:
Ok, to clear it up a bit. The bug happens when you have a page posttitle that is the same as the ID of the static front-page you've selected under the 'reading settings'. If I change my static front-page to my Contact-page (ID: 8), and then change a page's posttitle to '8', it bugs again.