Make WordPress Core

Opened 15 years ago

Closed 14 years ago

#14841 closed defect (bug) (fixed)

Searching within comments filtered by post shows results from all comments

Reported by: mintindeed's profile mintindeed Owned by: scribu's profile scribu
Milestone: 3.1 Priority: normal
Severity: normal Version: 3.0.1
Component: Comments Keywords: has-patch
Focuses: Cc:

Description

To reproduce:
Log in to WP admin
Go to "Comments"
Under "In response to" click the number of comments to filter comments by post
Search comments for any term
Search results show comments from all posts, not just the post being filtered

I've tested on versions 2.8.6, 2.9.2 and 3.0.1 and am able to reproduce on all.

It's arguable that the real bug is that "Comments on "Post name"" is still shown after searching, but if I've filtered comments by post and then search comments, I would expect to search through the comments I'm currently looking at.

Attachments (2)

Screen shot 2010-09-08 at 1.26.03 PM.png (109.4 KB) - added by mintindeed 15 years ago.
screenshot showing unexpected search results in comments admin in WP v3.0.1
edit-comments.diff (1.7 KB) - added by mintindeed 15 years ago.
Comments search is global, so if this is a search remove the post id

Download all attachments as: .zip

Change History (8)

@mintindeed
15 years ago

screenshot showing unexpected search results in comments admin in WP v3.0.1

#1 follow-ups: @nacin
15 years ago

Sounds to me like we should remove the post query var, and don't allow searching within the post.

It's a UX issue beyond that point. We don't provide for searching within what is filtered anywhere else (I don't think).

#2 in reply to: ↑ 1 @mintindeed
15 years ago

  • Keywords comments search admin removed

Replying to nacin:

Sounds to me like we should remove the post query var, and don't allow searching within the post.

It's a UX issue beyond that point. We don't provide for searching within what is filtered anywhere else (I don't think).

I just checked in 3.0.1 -- when you are in Edit Posts and filter by category the search results are filtered by category. If you filter by tags or author, the search results are not filtered.

@mintindeed
15 years ago

Comments search is global, so if this is a search remove the post id

#3 @mintindeed
15 years ago

  • Keywords has-patch added

After looking in trunk and checking out the new WP_List_Table class and ajax way of populating results, changing the way searhes are performed in 3.0.x would be unnecessary (and redundant).

I'm including a proposed patch for 3.0.1 that will remove the post ID when a search is performed, to get rid of the incorrect messaging.

#4 @scribu
15 years ago

  • Milestone changed from Awaiting Review to 3.1
  • Owner set to scribu
  • Status changed from new to reviewing

#5 in reply to: ↑ 1 @scribu
15 years ago

Replying to nacin:

It's a UX issue beyond that point. We don't provide for searching within what is filtered anywhere else (I don't think).

With the new ajaxified version, filtered search should come naturally. Will look more into this when I get the chance.

#6 @ryan
14 years ago

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

Seems to be fixed by the new tables and comment search.

Note: See TracTickets for help on using tickets.