Opened 4 months ago
Last modified 6 weeks ago
#65218 accepted defect (bug)
update-core.php - plugin slug is not clean
| Reported by: | timse201 | Owned by: | audrasjb |
|---|---|---|---|
| Priority: | normal | Milestone: | Future Release |
| Component: | Administration | Version: | |
| Severity: | normal | Keywords: | has-patch early |
| Cc: | Focuses: |
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 (6)
This ticket was mentioned in PR #11798 on WordPress/wordpress-develop by @khokansardar.
4 months ago
#1
- Keywords has-patch added
#2
@
4 months ago
Removing trunk version as this is not going to be shipped with WP 7.0 but in the next releases.
This ticket was mentioned in Slack in #core by adrianduffell. View the logs.
6 weeks ago
Note:
See TracTickets
for help on using tickets.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
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.