Make WordPress Core

Opened 13 years ago

Closed 11 years ago

#25556 closed defect (bug) (fixed)

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

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

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 13 years ago.

Download all attachments as: .zip

Change History (7)

#1 @kovshenin
13 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
13 years ago

Related: #24779

#3 @wonderboymusic
11 years ago

  • Owner set to wonderboymusic
  • Resolution → fixed
  • Status new → 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
11 years ago

  • Milestone Awaiting Review → 4.4

#5 @DrewAPicture
11 years ago

  • Resolution fixed
  • Status closed → reopened

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

#6 @DrewAPicture
11 years ago

  • Resolution → fixed
  • Status reopened → 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.