Opened 5 hours ago
Last modified 5 hours ago
#65461 new defect (bug)
Posts in list table are not kept up to date when changes are made in other windows
| Reported by: |
|
Owned by: | |
|---|---|---|---|
| Milestone: | 7.1 | Priority: | normal |
| Severity: | normal | Version: | |
| Component: | Posts, Post Types | Keywords: | |
| Focuses: | administration | Cc: |
Description (last modified by )
There are multiple scenarios where the posts listed on the posts screen (the post list table) can become out of date and show stale content (e.g. the old post title). For example:
- From the post list table, clicking to edit the post in a new tab. If a change is made to the title, the old title will appear in the list when the edit post screen tab is closed.
- Clicking to edit a post from the post list table, and then in the edit post screen changing the title and saving, followed by hitting the back button when the Instant Back/Forward plugin is active. The old post title is shown due to the edit posts screen being restored from bfcache. Related GitHub issue.
- Opening the Posts window with the WP Desktop Mode plugin active, if you click to edit a post it will open in another window shown at the same time in the desktop view. Edits to the post do not get reflected in the Posts window.
I understand that data views will be able to solve for this more elegantly when they are eventually implemented here, but in the meantime I think we can handle this by listening for updates to the posts and then triggering the admin ajax update that happens after a quick edit to re-render the row.
Additional implementation ideas include using the storage event to trigger an update when a user edits a post in another window, as well as to use heartbeat to broadcast updates to posts since a given timestamp when the posts screen was first loaded.
Special handling will be needed for post creation (e.g. an admin notice to trigger a page reload), and post deletions (e.g. to show the post row in red in a deleted state).
Related: #63636
Issue demonstration in WP Desktop Mode