Make WordPress Core

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's profile vondelphia Owned by:
Milestone: Priority: normal
Severity: normal Version:
Component: Toolbar Keywords: has-patch
Focuses: Cc:

Description (last modified by sabernhardt)

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.

  1. Log in WP Admin
  2. Create new Page / Post
  3. Click Publish
  4. "View Post" is not visible in admin bar

Attachments (4)

53948-admin-bar.php.diff (2.3 KB) - added by sabernhardt 3 years ago.
creating hidden placeholder link
53948-show-link-on-pageload.diff (2.1 KB) - added by sabernhardt 3 years ago.
second option: show preview link when page loads
view-posts-links-before-saving.png (49.6 KB) - added by sabernhardt 3 years ago.
adding View Post link to toolbar on new post screen (with 53948-show-link-on-pageload.diff)
53948.2.diff (2.3 KB) - added by sabernhardt 2 years ago.
updated since note in option with a temporarily hidden link (53948-admin-bar.php.diff)

Download all attachments as: .zip

Change History (14)

#1 @sabernhardt
3 years ago

  • Component changed from General to Toolbar
  • Description modified (diff)
  • Keywords needs-patch added

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.

Version 0, edited 3 years ago by sabernhardt (next)

@sabernhardt
3 years ago

creating hidden placeholder link

#2 @sabernhardt
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.

Last edited 3 years ago by sabernhardt (previous) (diff)

@sabernhardt
3 years ago

second option: show preview link when page loads

#3 @sabernhardt
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.

@sabernhardt
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 @sabernhardt
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.

This ticket was mentioned in Slack in #core by audrasjb. View the logs.


3 years ago

This ticket was mentioned in Slack in #core by sabernhardt. View the logs.


2 years ago

@sabernhardt
2 years ago

updated since note in option with a temporarily hidden link (53948-admin-bar.php.diff)

#9 @sabernhardt
2 years ago

  • Milestone changed from 6.0 to Future Release

#10 @sabernhardt
4 weeks ago

  • Milestone Future Release deleted
  • Resolution set to wontfix
  • Status changed from new to closed

The related issue GB20309 is closed, so I'll close this too.

Note: See TracTickets for help on using tickets.