Make WordPress Core

Opened 11 years ago

Closed 9 years ago

#25556 closed defect (bug) (fixed)

Recent Comments widget does not flush cache when a post is trashed

Reported by: kovshenin's profile kovshenin Owned by: wonderboymusic's profile wonderboymusic
Milestone: 4.4 Priority: normal
Severity: normal Version: 2.8
Component: Widgets Keywords: has-patch
Focuses: Cc:

Description

Steps to reproduce:

  1. Make sure persistent object caching is enabled
  2. Drop a recent comments widget to your sidebar
  3. Create a new post, comment on it
  4. Trash the post

Comment will still be visible in the widget, the link will lead to a 404.

Attachments (1)

25556.diff (587 bytes) - added by kovshenin 11 years ago.

Download all attachments as: .zip

Change History (7)

@kovshenin
11 years ago

#1 @kovshenin
11 years ago

  • Keywords has-patch added

25556.diff flushes the widget cache during post status transitions. We could probably go further and check whether the post type supports and/or has comments.

#2 @helen
11 years ago

Related: #24779

#3 @wonderboymusic
9 years ago

  • Owner set to wonderboymusic
  • Resolution set to fixed
  • Status changed from new to closed

In 34581:

Recent Comments Widget: a la [34464], this widget has the same mixed content issues. Remove the fragment caching. The comment queries are now split to scale. This was the only remaining widget with an HTML fragment cache.

Fixes #25556.

#4 @netweb
9 years ago

  • Milestone changed from Awaiting Review to 4.4

#5 @DrewAPicture
9 years ago

  • Resolution fixed deleted
  • Status changed from closed to reopened

We actually need to deprecate the flush_widget_cache() method instead of just removing it.

#6 @DrewAPicture
9 years ago

  • Resolution set to fixed
  • Status changed from reopened to closed

In 34622:

Restore and deprecate the WP_Widget_Recent_Comments::flush_widget_cache() method, removed in [34580].

Fixes #25556.

Note: See TracTickets for help on using tickets.