Opened 3 years ago
Closed 4 weeks ago
#53948 closed defect (bug) (wontfix)
Missing View Post from Admin Bar AFTER Publish (not update)
Reported by: | vondelphia | Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | |
Component: | Toolbar | Keywords: | has-patch |
Focuses: | Cc: |
Description (last modified by )
This creates a broken flow during development by forcing user to refresh page after publisher. This was not the case for the older GUI. You could just click publish and see Admin toolbar menu item "View Post" popup.
Adding a new Post / Page and clicking publish does not show "View Post" in admin bar UNLESS you refresh the page. The bottom left corner tooltip-like popup is not very good.
- Log in WP Admin
- Create new Page / Post
- Click Publish
- "View Post" is not visible in admin bar
Attachments (4)
Change History (14)
#1
@
3 years ago
- Component changed from General to Toolbar
- Description modified (diff)
- Keywords needs-patch added
#2
@
3 years ago
- Keywords has-patch added; needs-patch removed
- Milestone changed from Awaiting Review to 5.9
In 53948-admin-bar.php.diff, I chose to hide the View Post link on page load because the link does not resolve yet. This would still require removing the hidden
class when the editor publishes (and/or autosaves) the post.
On the other hand, the Permalink section already shows the same preview link when the page loads. If it's better to show the link immediately in the toolbar as well, the meta
class line could be removed. Then the link should not need any editor script or hook.
I preferred setting the ID to 'view', though 'preview' might make more sense because it starts with the preview URL. Either option updates the URL when clicking Publish.
#3
@
3 years ago
The second option 53948-show-link-on-pageload.diff is simpler, though perhaps not better. If someone clicks that link before the post is (auto)saved or published, it would result in a 404 error.
The same error already happens with the sidebar Permalinks section's link, but the toolbar is more prominent (when not hidden in fullscreen mode).
And for this patch, I used the 'preview' link ID and its target.
@
3 years ago
adding View Post link to toolbar on new post screen (with 53948-show-link-on-pageload.diff)
This ticket was mentioned in Slack in #core-editor by sabernhardt. View the logs.
3 years ago
This ticket was mentioned in Slack in #core by sabernhardt. View the logs.
3 years ago
#6
@
3 years ago
- Milestone changed from 5.9 to 6.0
This still needs a clear direction, so I'm moving it to the next release.
Hi and thanks for the ticket!
The classic UI automatically refreshed the page when publishing, and the block editor does not.
I have seen at least one report about this before, but that was apparently on the Gutenberg repository (GB20309 is one and GB31915 points to two other issues).
Perhaps the admin toolbar could include a placeholder div when creating a new post, so the block editor can replace that with a View Post link at the time it's published.