Edit Post: "View Post" link doesn't change when publishing draft #15402
Labels
[Feature] Saving
Related to saving functionality
Good First Issue
An issue that's suitable for someone looking to contribute for the first time
Needs Dev
Ready for, and needs developer efforts
[Package] Edit Post
/packages/edit-post
[Type] Bug
An existing feature does not function as intended
Previously: #14740 (comment)
When editing an existing post, a "View Post" link appears in the admin toolbar.
This link is intended to be automatically updated when the link for the post changes (e.g. changing the permalink and updating a published post):
gutenberg/packages/edit-post/src/store/actions.js
Lines 297 to 310 in 920b8f0
However, the above implementation relies on a selector which is effective only for published posts, not for drafts:
gutenberg/packages/edit-post/src/store/constants.js
Line 11 in 920b8f0
The link for a draft uses a different ID
wp-admin-bar-preview
.Steps to Reproduce:
Needs More Information:
The links in the admin bar are dynamically generated. It's not entirely clear to follow which possible selector values must be accounted for.
https://github.com/WordPress/wordpress-develop/blob/5640763da953c28033e9f285c7c2a1da4c613aa3/src/wp-includes/class-wp-admin-bar.php#L464
The text was updated successfully, but these errors were encountered: