#35368 closed defect (bug) (fixed)
Permalink structure not updating
Reported by: |
|
Owned by: |
|
---|---|---|---|
Milestone: | 4.5 | Priority: | normal |
Severity: | normal | Version: | 3.6 |
Component: | Permalinks | Keywords: | has-patch has-unit-tests commit |
Focuses: | Cc: |
Description
I've notice this issue on 2 WordPress sites running 4.4.1.
When you create a new page and select a sub sub parent page. The permalink doesn't seem to update matching the sub sub parent selected. Anyone have notice this issue?
Attachments (2)
Change History (14)
#2
follow-up:
↓ 3
@
10 years ago
The page was not published but save as draft.
Following this example /parent-page/child-page/grand-child-page/
Let say create a page call "test" and select parent page "child-page" the permalink update to domain.com/parent-page/test instead of domain.com/parent-page/child-page/test
I hope it make more sense now.
#3
in reply to:
↑ 2
@
10 years ago
- Keywords has-patch added; reporter-feedback removed
- Milestone changed from Awaiting Review to 4.5
Replying to jerome281:
The page was not published but save as draft.
Following this example /parent-page/child-page/grand-child-page/
Let say create a page call "test" and select parent page "child-page" the permalink update to domain.com/parent-page/test instead of domain.com/parent-page/child-page/test
I hope it make more sense now.
Thanks. I know can reproduce and confirm this.
Not sure if this was caused by #35084, but it doesn't look like it. It seems to me the bug is that $page->post_name
is empty in get_page_uri()
because it gets reset when calling get_post()
. The URI gets set to parent-page/child-page/
, but get_sample_permalink()
strips off /child-page
.
35368.diff fixes the issue.
#6
follow-up:
↓ 7
@
10 years ago
Not sure, I think there is another ticket about this, but haven't found it yet.
#9
@
10 years ago
- Keywords has-unit-tests added; needs-unit-tests removed
The added unit tests ensure that this will never happen again.
Can you give an example of how you set up your pages and what you expected vs. the actual permalinks?
I just did a quick local test with a few nested pages. After publishing the page all permalinks look correct (e.g.
/parent-page/child-page/grand-child-page/great-grand-child-page/
)