Opened 5 weeks ago
Last modified 4 weeks ago
#65218 accepted defect (bug)
update-core.php - plugin slug is not clean
| Reported by: |
|
Owned by: |
|
|---|---|---|---|
| Milestone: | 7.1 | Priority: | normal |
| Severity: | normal | Version: | |
| Component: | Administration | Keywords: | has-patch |
| Focuses: | Cc: |
Description
The plugin slug we use to generate the link is not clean on update core. It includes the parent folder. e.g. /plugin/plugin.php. The API is smart enough to redirect to the en_us page.
On the plugins screen, we use a clean one.
$plugin_data->update->slug
Change History (4)
This ticket was mentioned in PR #11798 on WordPress/wordpress-develop by @khokansardar.
5 weeks ago
#1
- Keywords has-patch added
Note: See
TracTickets for help on using
tickets.
The
View version X details.link rendered bylist_plugin_updates()on the WordPress Updates screen uses$plugin_data->update->slugdirectly when building theplugin-install.php?tab=plugin-information&plugin=...URL. In some cases this value is empty or includes the parent folder (e.g.plugin/plugin.php) instead of a clean plugin slug, producing a malformed details URL. The api.wordpress.org redirects mask this, but the URL is still incorrect and inconsistent with the link rendered on the Plugins screen.This adds a small defensive fallback that derives the slug from the plugin directory name (matching the pattern already used in
WP_Plugin_Upgrader) whenever the update response does not provide a clean slug.Props timse201.
See #65218.