WordPress.org

Make WordPress Core

Opened 4 years ago

Last modified 5 months ago

#35503 new feature request

Dashboard page: comment status in "Activity" group box shows incorrect

Reported by: antonrinas Owned by:
Milestone: Priority: normal
Severity: trivial Version: 4.4.1
Component: Comments Keywords: reporter-feedback
Focuses: Cc:
PR Number:

Description

STEPS TO REPRODUCE:
log in (subscriber user), create new comment for post, log in (administrator user), approve comment on Dashboard page using "Activity" group box, click "Approved (1)", click "Go back one page" in browser.
EXPECTED RESULT: comment status - Approved
ACTUAL RESULT: comment status - Unapproved
This problem was found in browsers Firefox 44.0b9, Chrome 47.0.2526.111 m

Change History (7)

#1 @rachelbaker
4 years ago

  • Keywords reporter-feedback added

click "Go back one page" in browser.

@antonrinas The user with the administrator role approves the comment from within the "Activity" section of the Dashboard. Then which user (subscriber role or administrator role) is clicking the back button in their browser? Where is this user expecting to the comment has been approved?

#2 @swissspidy
4 years ago

  • Keywords reporter-feedback removed

Browsers cache the previously visited pages, so when you go back, the page isn't reloaded. Hence the wrong status.

#3 @swissspidy
4 years ago

  • Keywords reporter-feedback added

#4 @afercia
4 years ago

Well, this happens also on the Comments screen. Browser cache the HTML rendered at page load, not the one that is updated via AJAX.

#5 in reply to: ↑ description @antonrinas
4 years ago

STEPS TO REPRODUCE:

  1. Log in as administrator user.
  2. Remove all posts (if exist).
  3. Add new post.
  4. Log out.
  5. Log in as subscriber user.
  6. Add comment to post that was created by administrator.
  7. Log out.
  8. Log in as administrator user.
  9. On dashboard page we see one unapproved comment.
  10. On dashboard page hover comment. Click "Approve" in show up menu.
  11. Click "All (1)" in the bottom part of "Activity" group box on the Dashboard page.
  12. Go back (press Backspace key).

EXPECTED RESULT: comment status - Approved
ACTUAL RESULT: comment status - Unapproved

#6 @swissspidy
4 years ago

Again, this happens because browsers cache the previously visited page.

If JS is fired as usual when going back to this cached page, we could theoretically update the comment counts on page load. But I'm not sure this is worth the effort.

#7 @antonrinas
4 years ago

  • Severity changed from normal to trivial
  • Type changed from defect (bug) to feature request
Note: See TracTickets for help on using tickets.