Make WordPress Core

Opened 18 years ago

Closed 17 years ago

Last modified 5 months ago

#2840 closed defect (bug) (fixed)

Comments RSS does not respect filtering done by the_posts hook

Reported by: coppit's profile coppit Owned by: rob1n's profile rob1n
Milestone: 2.2 Priority: normal
Severity: normal Version: 2.1
Component: General Keywords:
Focuses: Cc:


The comments RSS should only provide comments for posts that are actually visible after filtering. To see the problem:

  1. Create a plugin that uses the the_posts hook to filter the list of posts. Have it return an empty array.
  2. Look at and you will see all your comments for supposedly filtered posts.

If you don't want to create a plugin, you can use my category access plugin: Just set the default access to none to restrict all posts in all categories.

I believe the solution is to modify the SQL in wp-commentsrss2.php, adding a WHERE clause that restricts the query to only those posts that are returned from the_posts.

Change History (4)

#1 @mdawaffe
18 years ago

  • Milestone set to 2.1

I wrote an old patch at #2485 to address this.

#2 @matt
18 years ago

  • Milestone changed from 2.1 to 2.2

#3 @rob1n
17 years ago

  • Owner changed from anonymous to rob1n
  • Status changed from new to assigned
  • Version set to 2.1

#4 @rob1n
17 years ago

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

I believe this was fixed when #2485's changes went in.

Note: See TracTickets for help on using tickets.