Comments search should only filter the main query or ignored for the To Do widget
- Dominant language
- JavaScript
- Stars
- 338
- Forks
- 56
- Avg merge
- 24m
- Merged PRs (30d)
- 16
Description
[`o2_Search`](https://github.com/Automattic/o2/blob/3335bbe076b0fa8e4579427661ee84735134081a/inc/search.php#L8) uses query filters which affects all queries, even those by the [To Do widget](https://github.com/Automattic/o2/blob/62cb626/modules/to-do/inc/class-to-do-widget.php#L275). Because of this the widget query may not return any results.
Example: https://make.wordpress.org/polyglots/?s=notfound
The widgets "Editor Requests", "Locale Requests" and "General Requests" are empty.
A fix would be to filter only the main query or to set `$args['s'] = ''` for the widget query.
Contributor guide
No contributing guide indexed for this repository
Research direction
Start in inc/search.php at o2_Search and compare its query filters with the To Do widget query in modules/to-do/inc/class-to-do-widget.php. Reproduce the empty widgets at the linked Polyglots search URL, then verify that the main search still filters for “notfound” while the Editor Requests, Locale Requests, and General Requests widgets can return their results.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php, wordpress
- Domain
- backend, search
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 45/100