Opened 11 years ago
Closed 9 years ago
#27726 closed defect (bug) (wontfix)
Get Shortlink button isn't shown on draft posts
Reported by: |
|
Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | 3.8.1 |
Component: | Administration | Keywords: | has-patch |
Focuses: | Cc: |
Description
In version 3.6 when you are editing a draft post there is a "Get Shortlink" button below the title. But in 3.7 and 3.8 that button only appears after the post has been published.
One of our clients was using that button to place links from draft pages to other draft pages (apparently using the full permalink didn't work for them, I assume they changed the titles before hitting the publish button).
The code which changed is line 447 of wp-admin/edit-form-advanced.php:
if ( !empty( $shortlink ) && $shortlink !== $permalink && $permalink !== home_url('?page_id=' . $post->ID) )
(Removing "$shortlink !== $permalink && " would fix the regression.)
Attachments (2)
Change History (11)
#1
@
11 years ago
- Keywords needs-patch added
- Milestone changed from Awaiting Review to Future Release
#4
@
9 years ago
- Milestone changed from Future Release to 4.4
Patch still applies lets get this in 4.4
#5
@
9 years ago
Out of curiosity, what are people using this button for these days, now that URL shortening is usually done through a service of some variety? Is it useful in its default state (that is, without a plugin for running shortlinks via said service)?
This ticket was mentioned in Slack in #core by sergey. View the logs.
9 years ago
#8
in reply to:
↑ description
@
9 years ago
One of our clients was using that button to place links from draft pages to other draft pages (apparently using the full permalink didn't work for them, I assume they changed the titles before hitting the publish button).
They're using the "dirty"/default permalink, it sounds like (e.g. https://example.com/?p=123456 ) since no matter what the actual pretty permalink ends up being or changed in the future, it'll properly redirect to it (as opposed to traditional "shortlink" usage to have a smaller URL for a permanent permalink).
The removal of the shortlink when the permalink matches makes sense generally—sites using the default permalinks don't need the shortlink button since it is the same—but does trip up folks using it as a permalink for a to-be-published post.
As a middle ground, if the post is unpublished, revert to the old behavior. If the post is published and the site is using default permalink, retain the new behavior?
Patched based on comment and minor code standards improvement