Opened 8 years ago
Closed 8 years ago
#37423 closed defect (bug) (fixed)
Permalink for pending post - get_sample_permalink_html bug
Reported by: | knutsp | Owned by: | jorbin |
---|---|---|---|
Milestone: | 4.7 | Priority: | normal |
Severity: | major | Version: | 4.4 |
Component: | Permalinks | Keywords: | has-patch dev-feedback |
Focuses: | ui, administration | Cc: |
Description
Steps to reproduce:
- Create a new post, edit Status to
Pending Review
and pressSave as Pending
- After saved, observe the
Permalink
field
Expected, either:
- No permalink yet (but a draft displays a working preview link)
- A working link for preview post, and that the displayed URL and the actual
href
value on it is equal
Actual:
- Permalink is displayed as
https://example.com/2016/my-post/
(gives status 404) - Permalink href is actually:
https://example.com/2016//
(shows the yearly archive)
(Permalink settings: /%year%/%postname%/
)
Attachments (3)
Change History (10)
#2
@
8 years ago
- Keywords has-patch dev-feedback needs-unit-tests added
- Version set to 4.4
37423.diff
just fixes the href part and let's you preview the post when clicking. The displayed link, however, still shows an invalid permalink / preview link for posts not yet given a post_name
.
I think this bug was introduced in 4.4 when this part of the screen was redesigned a bit.
Please help get this fixed.
#3
@
8 years ago
- Component changed from Editor to Permalinks
- Focuses ui added
- Severity changed from normal to major
- Summary changed from Permalink for pending post - editor bug to Permalink for pending post - get_sample_permalink_html bug
Anyone to take a look at this?
#4
@
8 years ago
Hello from the other side! (Adele)
I report a bug, then try my best to make patch, but no comments or anything. I'm now feeling this is ignored. Is there some active maintainer for the Permalinks
component? Or @helen? Do you want bugs reported from users?
This ticket needs a milestone, at least. Or say it's not a bug at all.
#6
@
8 years ago
- Keywords needs-unit-tests removed
I've attached a test for posts that contain no post_name to make sure they instead use the preview link rather than a broken permalink. This test passes with the previous patch (37423.diff
) but fails without.
Also realised my message for the test had the wrong ticket number in it, apologies.
As a draft the permalink field displays
https://example.com/2016/my-post/
and links tohttps://example.com/?p=123&preview=true
(correct).So it seems the displayed URL is meant to be a kind of permalink suggestion. Ok, but it's a "faked" link and feels strange and buggy. But the actual link must work, also for pending posts.