Automattic / Automattic/jetpack

Search: Can not remove filters from existing search widget

Open
#17,039 0 comments 0 reactions 0 assignees View on GitHub
[Feature] Search [Pri] Low [Status] Auto-allocated Bug Triaged
Dominant language
PHP
Stars
1.8k
Forks
898
Avg merge
1d 18h
Merged PRs (30d)
774

Description

#### Steps to reproduce the issue

On a site with existing Search widget and with the 8.9 RC:

1. Go to frontend of site
2. Click on customizer
3. Remove filters
4. See mention of error in customizer

#### What I expected

To be able to remove filters.

#### What happened instead

An error message was shown

**Screenshots**

There's a screen recording at a1HpG7-a3R-p2

Here are some entries from the `debug.log` file:

```
[31-Aug-2020 21:39:24 UTC] PHP Notice: Undefined index: type in /plugins/jetpack-dev/modules/search/class.jetpack-search-helpers.php on line 230
[31-Aug-2020 21:39:24 UTC] PHP Notice: Undefined index: type in /plugins/jetpack-dev/modules/search/class.jetpack-search-helpers.php on line 181
[31-Aug-2020 21:39:24 UTC] PHP Notice: Undefined index: type in /plugins/jetpack-dev/modules/search/class.jetpack-search-helpers.php on line 230
[31-Aug-2020 21:39:24 UTC] PHP Notice: Undefined index: type in /plugins/jetpack-dev/modules/search/class.jetpack-search-helpers.php on line 181
[31-Aug-2020 21:39:24 UTC] PHP Notice: Undefined index: type in /plugins/jetpack-dev/modules/search/class.jetpack-search.php on line 1284
[31-Aug-2020 21:39:24 UTC] PHP Notice: Undefined index: type in /plugins/jetpack-dev/modules/search/class.jetpack-search.php on line 1284
[31-Aug-2020 21:39:24 UTC] PHP Notice: Undefined index: type in /plugins/jetpack-dev/modules/search/class.jetpack-search-helpers.php on line 230
[31-Aug-2020 21:39:24 UTC] PHP Notice: Undefined index: type in /plugins/jetpack-dev/modules/search/class.jetpack-search-helpers.php on line 181
[31-Aug-2020 21:39:24 UTC] PHP Notice: Undefined index: type in /plugins/jetpack-dev/modules/search/class.jetpack-search-helpers.php on line 230
[31-Aug-2020 21:39:24 UTC] PHP Notice: Undefined index: type in /plugins/jetpack-dev/modules/search/class.jetpack-search-helpers.php on line 181
[31-Aug-2020 21:39:37 UTC] PHP Notice: Undefined index: type in /plugins/jetpack-dev/modules/search/class.jetpack-search-helpers.php on line 230
[31-Aug-2020 21:39:37 UTC] PHP Notice: Undefined index: type in /plugins/jetpack-dev/modules/search/class.jetpack-search-helpers.php on line 181
[31-Aug-2020 21:39:37 UTC] PHP Notice: Undefined index: type in /plugins/jetpack-dev/modules/search/class.jetpack-search-helpers.php on line 230
[31-Aug-2020 21:39:37 UTC] PHP Notice: Undefined index: type in /plugins/jetpack-dev/modules/search/class.jetpack-search-helpers.php on line 181
[31-Aug-2020 21:39:37 UTC] PHP Notice: Undefined index: type in /plugins/jetpack-dev/modules/search/class.jetpack-search-helpers.php on line 230
[31-Aug-2020 21:39:37 UTC] PHP Notice: Undefined index: type in /plugins/jetpack-dev/modules/search/class.jetpack-search-helpers.php on line 181
[31-Aug-2020 21:39:37 UTC] PHP Notice: Undefined index: type in /plugins/jetpack-dev/modules/search/class.jetpack-search-helpers.php on line 230
[31-Aug-2020 21:39:37 UTC] PHP Notice: Undefined index: type in /plugins/jetpack-dev/modules/search/class.jetpack-search-helpers.php on line 181
[31-Aug-2020 21:39:37 UTC] PHP Notice: Undefined index: type in /plugins/jetpack-dev/modules/search/class.jetpack-search.php on line 1284
[31-Aug-2020 21:39:37 UTC] PHP Notice: Undefined index: type in /plugins/jetpack-dev/modules/search/class.jetpack-search.php on line 1284
[31-Aug-2020 21:39:37 UTC] PHP Notice: Undefined index: type in /plugins/jetpack-dev/modules/search/class.jetpack-search-helpers.php on line 230
[31-Aug-2020 21:39:37 UTC] PHP Notice: Undefined index: type in /plugins/jetpack-dev/modules/search/class.jetpack-search-helpers.php on line 181
[31-Aug-2020 21:39:37 UTC] PHP Notice: Undefined index: type in /plugins/jetpack-dev/modules/search/class.jetpack-search-helpers.php on line 230
[31-Aug-2020 21:39:37 UTC] PHP Notice: Undefined index: type in /plugins/jetpack-dev/modules/search/class.jetpack-search-helpers.php on line 181
[31-Aug-2020 21:39:43 UTC] PHP Notice: register_rest_route was called incorrectly. The REST API route definition for places-map/v1/images/(?P\d+) is missing the required permission_callback argument. For REST API routes that are intended to be public, use __return_true as the permission callback. Please see Debugging in WordPress for more information. (This message was added in version 5.5.0.) in /wordpress/core/5.5/wp-includes/functions.php on line 5225
[31-Aug-2020 21:39:43 UTC] PHP Notice: register_rest_route was called incorrectly. The REST API route definition for jetpack-boost/v1/critical-css/(?P.+)/success is missing the required permission_callback argument. For REST API routes that are intended to be public, use __return_true as the permission callback. Please see Debugging in WordPress for more information. (This message was added in version 5.5.0.) in /wordpress/core/5.5/wp-includes/functions.php on line 5225
[31-Aug-2020 21:39:43 UTC] PHP Notice: register_rest_route was called incorrectly. The REST API route definition for jetpack-boost/v1/critical-css/(?P.+)/error is missing the required permission_callback argument. For REST API routes that are intended to be public, use __return_true as the permission callback. Please see Debugging in WordPress for more information. (This message was added in version 5.5.0.) in /wordpress/core/5.5/wp-includes/functions.php on line 5225
[31-Aug-2020 21:39:43 UTC] PHP Notice: register_rest_route was called incorrectly. The REST API route definition for jetpack-boost/v1/web-vitals/(?P.+)/success is missing the required permission_callback argument. For REST API routes that are intended to be public, use __return_true as the permission callback. Please see Debugging in WordPress for more information. (This message was added in version 5.5.0.) in /wordpress/core/5.5/wp-includes/functions.php on line 5225
[31-Aug-2020 21:39:43 UTC] PHP Notice: register_rest_route was called incorrectly. The REST API route definition for jetpack-boost/v1/web-vitals/(?P.+)/error is missing the required permission_callback argument. For REST API routes that are intended to be public, use __return_true as the permission callback. Please see Debugging in WordPress for more information. (This message was added in version 5.5.0.) in /wordpress/core/5.5/wp-includes/functions.php on line 5225
[31-Aug-2020 21:39:46 UTC] PHP Notice: Undefined index: type in /plugins/jetpack-dev/modules/search/class.jetpack-search-helpers.php on line 230
[31-Aug-2020 21:39:46 UTC] PHP Notice: Undefined index: type in /plugins/jetpack-dev/modules/search/class.jetpack-search-helpers.php on line 181
[31-Aug-2020 21:39:46 UTC] PHP Notice: Undefined index: type in /plugins/jetpack-dev/modules/search/class.jetpack-search-helpers.php on line 230
[31-Aug-2020 21:39:46 UTC] PHP Notice: Undefined index: type in /plugins/jetpack-dev/modules/search/class.jetpack-search-helpers.php on line 181
[31-Aug-2020 21:39:46 UTC] PHP Notice: Undefined index: type in /plugins/jetpack-dev/modules/search/class.jetpack-search.php on line 1284
[31-Aug-2020 21:39:46 UTC] PHP Notice: Undefined index: type in /plugins/jetpack-dev/modules/search/class.jetpack-search.php on line 1284
[31-Aug-2020 21:39:46 UTC] PHP Notice: Trying to get property 'ID' of non-object in /wordpress/core/5.5/wp-includes/class-wp-query.php on line 4019
[31-Aug-2020 21:39:46 UTC] PHP Notice: Trying to get property 'post_title' of non-object in /wordpress/core/5.5/wp-includes/class-wp-query.php on line 4021
[31-Aug-2020 21:39:46 UTC] PHP Notice: Trying to get property 'post_name' of non-object in /wordpress/core/5.5/wp-includes/class-wp-query.php on line 4023
[31-Aug-2020 21:39:46 UTC] PHP Notice: Undefined index: type in /plugins/jetpack-dev/modules/search/class.jetpack-search-helpers.php on line 230
[31-Aug-2020 21:39:46 UTC] PHP Notice: Undefined index: type in /plugins/jetpack-dev/modules/search/class.jetpack-search-helpers.php on line 181
[31-Aug-2020 21:39:46 UTC] PHP Notice: Undefined index: type in /plugins/jetpack-dev/modules/search/class.jetpack-search-helpers.php on line 230
[31-Aug-2020 21:39:46 UTC] PHP Notice: Undefined index: type in /plugins/jetpack-dev/modules/search/class.jetpack-search-helpers.php on line 181
[31-Aug-2020 21:39:47 UTC] PHP Notice: Undefined index: type in /plugins/jetpack-dev/modules/search/class.jetpack-search-helpers.php on line 230
[31-Aug-2020 21:39:47 UTC] PHP Notice: Undefined index: type in /plugins/jetpack-dev/modules/search/class.jetpack-search-helpers.php on line 181
[31-Aug-2020 21:39:47 UTC] PHP Notice: Undefined index: type in /plugins/jetpack-dev/modules/search/class.jetpack-search-helpers.php on line 230
[31-Aug-2020 21:39:47 UTC] PHP Notice: Undefined index: type in /plugins/jetpack-dev/modules/search/class.jetpack-search-helpers.php on line 181
[31-Aug-2020 21:39:47 UTC] PHP Notice: Undefined index: type in /plugins/jetpack-dev/modules/search/class.jetpack-search.php on line 1284
[31-Aug-2020 21:39:47 UTC] PHP Notice: Undefined index: type in /plugins/jetpack-dev/modules/search/class.jetpack-search.php on line 1284
[31-Aug-2020 21:39:47 UTC] PHP Notice: Undefined index: type in /plugins/jetpack-dev/modules/search/class.jetpack-search-helpers.php on line 230
[31-Aug-2020 21:39:47 UTC] PHP Notice: Undefined index: type in /plugins/jetpack-dev/modules/search/class.jetpack-search-helpers.php on line 181
[31-Aug-2020 21:39:47 UTC] PHP Notice: Undefined index: type in /plugins/jetpack-dev/modules/search/class.jetpack-search-helpers.php on line 230
[31-Aug-2020 21:39:47 UTC] PHP Notice: Undefined index: type in /plugins/jetpack-dev/modules/search/class.jetpack-search-helpers.php on line 181
[31-Aug-2020 21:39:50 UTC] PHP Notice: Undefined index: jetpack-search-filters-8 in /wordpress/core/5.5/wp-includes/widgets.php on line 880
[31-Aug-2020 21:39:50 UTC] PHP Notice: Undefined index: jetpack-search-filters-7 in /wordpress/core/5.5/wp-includes/widgets.php on line 880
[31-Aug-2020 21:39:50 UTC] PHP Notice: Undefined index: jetpack-search-filters-8 in /wordpress/core/5.5/wp-includes/widgets.php on line 880
[31-Aug-2020 21:39:51 UTC] PHP Notice: Undefined index: jetpack-search-filters-7 in /wordpress/core/5.5/wp-includes/widgets.php on line 880
[31-Aug-2020 21:39:51 UTC] PHP Notice: Undefined index: jetpack-search-filters-8 in /wordpress/core/5.5/wp-includes/widgets.php on line 880
[31-Aug-2020 21:39:51 UTC] PHP Notice: Undefined index: jetpack-search-filters-7 in /wordpress/core/5.5/wp-includes/widgets.php on line 880
[31-Aug-2020 21:39:51 UTC] PHP Notice: Undefined index: jetpack-search-filters-8 in /wordpress/core/5.5/wp-includes/widgets.php on line 880
[31-Aug-2020 21:39:51 UTC] PHP Notice: Undefined index: jetpack-search-filters-7 in /wordpress/core/5.5/wp-includes/widgets.php on line 880
[31-Aug-2020 21:39:51 UTC] PHP Notice: Undefined index: jetpack-search-filters-8 in /wordpress/core/5.5/wp-includes/widgets.php on line 880
[31-Aug-2020 21:39:51 UTC] PHP Notice: Undefined index: jetpack-search-filters-7 in /wordpress/core/5.5/wp-includes/widgets.php on line 880
[31-Aug-2020 21:39:51 UTC] PHP Notice: Undefined index: jetpack-search-filters-8 in /wordpress/core/5.5/wp-includes/widgets.php on line 880
[31-Aug-2020 21:39:51 UTC] PHP Notice: Undefined index: jetpack-search-filters-7 in /wordpress/core/5.5/wp-includes/widgets.php on line 880
[31-Aug-2020 21:39:51 UTC] {"message":"Non-existent changeset UUID.<\/script>\n<script type='text\/javascript' src='https:\/\/c0.wp.com\/c\/5.5\/wp-includes\/js\/json2.min.js' id='json2-js'><\/script>\n<script type='text\/javascript' src='https:\/\/c0.wp.com\/c\/5.5\/wp-includes\/js\/underscore.min.js' id='underscore-js'><\/script>\n<script type='text\/javascript' src='https:\/\/c0.wp.com\/c\/5.5\/wp-includes\/js\/customize-base.min.js' id='customize-base-js'><\/script>\n\t\t\t<script>\n\t\t\t( function( api, settings ) {\n\t\t\t\tvar preview = new api.Messenger( settings.messengerArgs );\n\t\t\t\tpreview.send( 'iframe-loading-error', settings.error );\n\t\t\t} )( wp.customize, {\"messengerArgs\":{\"channel\":\"preview-0\",\"url\":\"https:\\\/\\\/eric.blog\\\/wp-admin\\\/customize.php\"},\"error\":0} );\n\t\t\t<\/script>\n\t\t\t","title":"","args":[]}
[31-Aug-2020 21:39:52 UTC] PHP Notice: Undefined index: type in /plugins/jetpack-dev/modules/search/class.jetpack-search-helpers.php on line 230
[31-Aug-2020 21:39:52 UTC] PHP Notice: Undefined index: type in /plugins/jetpack-dev/modules/search/class.jetpack-search-helpers.php on line 181
[31-Aug-2020 21:39:52 UTC] PHP Notice: Undefined index: type in /plugins/jetpack-dev/modules/search/class.jetpack-search-helpers.php on line 230
[31-Aug-2020 21:39:52 UTC] PHP Notice: Undefined index: type in /plugins/jetpack-dev/modules/search/class.jetpack-search-helpers.php on line 181
[31-Aug-2020 21:39:56 UTC] PHP Notice: Undefined index: type in /plugins/jetpack-dev/modules/search/class.jetpack-search-helpers.php on line 230
[31-Aug-2020 21:39:56 UTC] PHP Notice: Undefined index: type in /plugins/jetpack-dev/modules/search/class.jetpack-search-helpers.php on line 181
[31-Aug-2020 21:39:56 UTC] PHP Notice: Undefined index: type in /plugins/jetpack-dev/modules/search/class.jetpack-search-helpers.php on line 230
[31-Aug-2020 21:39:56 UTC] PHP Notice: Undefined index: type in /plugins/jetpack-dev/modules/search/class.jetpack-search-helpers.php on line 181
[31-Aug-2020 21:39:56 UTC] PHP Notice: Undefined index: type in /plugins/jetpack-dev/modules/search/class.jetpack-search.php on line 1284
[31-Aug-2020 21:39:56 UTC] PHP Notice: Undefined index: type in /plugins/jetpack-dev/modules/search/class.jetpack-search.php on line 1284
[31-Aug-2020 21:39:56 UTC] PHP Notice: Undefined index: type in /plugins/jetpack-dev/modules/search/class.jetpack-search-helpers.php on line 230
[31-Aug-2020 21:39:56 UTC] PHP Notice: Undefined index: type in /plugins/jetpack-dev/modules/search/class.jetpack-search-helpers.php on line 181
[31-Aug-2020 21:39:56 UTC] PHP Notice: Undefined index: type in /plugins/jetpack-dev/modules/search/class.jetpack-search-helpers.php on line 230
[31-Aug-2020 21:39:56 UTC] PHP Notice: Undefined index: type in /plugins/jetpack-dev/modules/search/class.jetpack-search-helpers.php on line 181
[31-Aug-2020 21:39:56 UTC] PHP Notice: Undefined index: type in /plugins/jetpack-dev/modules/search/class.jetpack-search-helpers.php on line 230
[31-Aug-2020 21:39:56 UTC] PHP Notice: Undefined index: type in /plugins/jetpack-dev/modules/search/class.jetpack-search-helpers.php on line 181
[31-Aug-2020 21:39:56 UTC] PHP Notice: Undefined index: type in /plugins/jetpack-dev/modules/search/class.jetpack-search-helpers.php on line 230
[31-Aug-2020 21:39:56 UTC] PHP Notice: Undefined index: type in /plugins/jetpack-dev/modules/search/class.jetpack-search-helpers.php on line 181
[31-Aug-2020 21:39:57 UTC] PHP Notice: Undefined index: sort in /plugins/jetpack-dev/modules/widgets/search.php on line 644
[31-Aug-2020 21:39:57 UTC] PHP Notice: Undefined index: type in /plugins/jetpack-dev/modules/search/class.jetpack-search-helpers.php on line 230
[31-Aug-2020 21:39:57 UTC] PHP Notice: Undefined index: type in /plugins/jetpack-dev/modules/search/class.jetpack-search-helpers.php on line 181
[31-Aug-2020 21:39:57 UTC] PHP Notice: Undefined index: type in /plugins/jetpack-dev/modules/search/class.jetpack-search-helpers.php on line 230
[31-Aug-2020 21:39:57 UTC] PHP Notice: Undefined index: type in /plugins/jetpack-dev/modules/search/class.jetpack-search-helpers.php on line 181
[31-Aug-2020 21:40:00 UTC] PHP Notice: Undefined index: sort in /plugins/jetpack-dev/modules/widgets/search.php on line 644
[31-Aug-2020 21:40:03 UTC] PHP Notice: Undefined index: type in /plugins/jetpack-dev/modules/search/class.jetpack-search-helpers.php on line 230
[31-Aug-2020 21:40:04 UTC] PHP Notice: Undefined index: type in /plugins/jetpack-dev/modules/search/class.jetpack-search-helpers.php on line 181
[31-Aug-2020 21:40:04 UTC] PHP Notice: Undefined index: type in /plugins/jetpack-dev/modules/search/class.jetpack-search-helpers.php on line 230
[31-Aug-2020 21:40:04 UTC] PHP Notice: Undefined index: type in /plugins/jetpack-dev/modules/search/class.jetpack-search-helpers.php on line 181
[31-Aug-2020 21:40:04 UTC] PHP Notice: Undefined index: type in /plugins/jetpack-dev/modules/search/class.jetpack-search-helpers.php on line 230
[31-Aug-2020 21:40:04 UTC] PHP Notice: Undefined index: type in /plugins/jetpack-dev/modules/search/class.jetpack-search-helpers.php on line 181
[31-Aug-2020 21:40:04 UTC] PHP Notice: Undefined index: type in /plugins/jetpack-dev/modules/search/class.jetpack-search-helpers.php on line 230
[31-Aug-2020 21:40:04 UTC] PHP Notice: Undefined index: type in /plugins/jetpack-dev/modules/search/class.jetpack-search-helpers.php on line 181
[31-Aug-2020 21:40:09 UTC] PHP Notice: Undefined index: sort in /plugins/jetpack-dev/modules/widgets/search.php on line 644
```

Contributor guide

Open the contributing guide

Research direction

Reproduce the issue in the Search widget customizer on a site with an existing widget, then inspect modules/search/class.jetpack-search-helpers.php at lines 181 and 230 and modules/search/class.jetpack-search.php at line 1284. Done means filters can be removed without the customizer error or the reported undefined-index notices.

Written by the indexing model from the issue text.

Assessment

Tech stack
php
Domain
backend, frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.