Opened 12 years ago
Last modified 6 years ago
#23781 new defect (bug)
New Post Publishes to Wrong URL
Reported by: |
|
Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | critical | Version: | 3.4.2 |
Component: | Permalinks | Keywords: | |
Focuses: | Cc: |
Description
The "Permalink" displayed in the editor for new posts may be wrong, and changes (surprise!) when the Publish button is clicked.
Steps to reproduce this:
- Start typing a title in a new post.
- Wait for an auto-save and Permalink to appear.
- Make the title longer.
- Type a post body.
- Click Publish.
Expected result:
The new post should be published at the Permalink being displayed on the post editor.
Actual result:
A completely different permalink is generated based on the current title. The new page gets cached at the "wrong" URL before any changes can be made. General pandemonium ensues. Etc. (It's not a blocker bug, but it is so completely annoying!)
Change History (7)
#2
follow-up:
↓ 3
@
12 years ago
The new page gets cached at the "wrong" URL before any changes can be made.
Could you clarify this part? When I follow those steps, the post slug is indeed updated after clicking Publish, but I don't see any problems with the new URL (and View Post button is only available with that new URL).
Or are you suggesting to never update the slug automatically after the first autosave?
#3
in reply to:
↑ 2
@
12 years ago
The point about caching is merely plugin related. The bug is in core and the cache will follow whatever core says is the Permalink.
Replying to SergeyBiryukov:
The post slug is indeed updated after clicking Publish
That makes no sense.
Are you suggesting to never update the slug automatically after the first autosave?
Autosave updates are fine. Making unwanted changes to a post after the user publishes it is stupid.
#4
@
12 years ago
Let me expand on that one more step. There is probably a corner case where if the slug is NULL then it needs to be regenerated during publication. Otherwise, the user is expecting the displayed Permalink to be the correct one.
#6
@
10 years ago
WP did it to me again. I know I clicked the Preview button several times. Probably never used the Save button because the editor was auto saving just fine. Then I hit the Publish button and BOOM -- the slug that I had already customized got totally mangled because I had edited the title a few times afterward.
Tested and confirmed on 3.4.2 as well.