Make WordPress Core

Opened 11 years ago

Last modified 6 years ago

#27623 reopened defect (bug)

Search results for " " text appearing on every plugin activation or deactivation

Reported by: henrywright's profile henry.wright Owned by:
Milestone: Priority: normal
Severity: normal Version: 3.8.1
Component: Plugins Keywords: has-patch needs-refresh
Focuses: administration Cc:

Description

When I activate or deactivate a plugin via the plugins page in WP admin, I get the following text appear at the top of the page next to the Plugins heading:

Search results for “ ”

The URL looks like:

wp-admin/plugins.php?activate=true&plugin_status=search&paged=1&s=+

As you can see from the URL, $s or $_REQUEST['s'] is set which results in the following line (around 414) in wp-admin/plugins.php executing:

printf( '<span class="subtitle">' . __('Search results for &#8220;%s&#8221;') . '</span>', esc_html( $s ) );

Why is $_REQUEST['s'] being set in this situation? Does it need to be?

Attachments (4)

27623.diff (640 bytes) - added by MikeHansenMe 10 years ago.
Trim search for plugin search
27623.2.diff (754 bytes) - added by MikeHansenMe 10 years ago.
Check if empty
27623.3.diff (2.2 KB) - added by MikeHansenMe 9 years ago.
27623.4.diff (2.1 KB) - added by lukecavanagh 8 years ago.
Patch refresh

Download all attachments as: .zip

Change History (13)

#1 @Clorith
11 years ago

  • Component changed from General to Plugins
  • Focuses administration added
  • Resolution set to invalid
  • Status changed from new to closed

The s needs to be set to retain your plugin list view if you searched to find a plugin.

The reason you are seeing this is because a search containing only a space character has been issued (This is why you are seeing both plugin_status=search as well as s=+ as part of the address).

#2 @henry.wright
11 years ago

  • Resolution invalid deleted
  • Status changed from closed to reopened

Hi Clorith

Thanks for the explanation. I should have included an explanation such as that in the ticket description.

May I ask why you closed the ticket?

#3 @SergeyBiryukov
11 years ago

We could probably trim $_REQUEST['s'] to discard spaces as a keyword, but this is not specific to the Plugins screen. We should do that consistently for other screens as well.

#4 @henry.wright
11 years ago

Wouldn't hurt trimming $_REQUEST['s'] if the value is only whitespace would it? The default front-end search uses that same query param as well.

@MikeHansenMe
10 years ago

Trim search for plugin search

@MikeHansenMe
10 years ago

Check if empty

#5 @MikeHansenMe
10 years ago

  • Keywords has-patch added

#6 @DrewAPicture
9 years ago

  • Keywords needs-refresh added

Patch needs to be refreshed.

#7 @SergeyBiryukov
9 years ago

  • Keywords needs-patch added; has-patch needs-refresh removed

Per comment:3, this should be done consistently for all screens, not just for Plugins.

@MikeHansenMe
9 years ago

#8 @MikeHansenMe
9 years ago

  • Keywords has-patch added; needs-patch removed

#9 @MikeHansenMe
9 years ago

  • Keywords needs-refresh added

@lukecavanagh
8 years ago

Patch refresh

Note: See TracTickets for help on using tickets.