#666 closed defect (bug)
Wrong Plugin shown from view details in wp-admin/plugins.php
Reported by: | anmari | Owned by: | ocean90 |
---|---|---|---|
Milestone: | Priority: | normal | |
Component: | Plugin Directory | Keywords: | |
Cc: |
Description
I have what appears to be an older maintenance mode plugin (
Version 5.4 | By Michael Wöhrer) homepage: http://sw-guide.de/wordpress/plugins/maintenance-mode/ (many of these links back to wordpress.org are broken - perhaps the plugin is no longer hosted there.)
The "view details" link shows details from https://wordpress.org/plugins/rocket-maintenance-mode/ which is a much newer plugin by a different author.
See attached screenshot (very small text to try to get both the view details box and the plugin details behind to show.)
I don't see anything in the readme or plugin header that would cause this to happen. Maybe this is a url/tag/name funny that happens when the original plugin is no longer hosted ?
Attachments (1)
Change History (7)
#1
@
9 years ago
So! As it happens, there was a plugin called https://wordpress.org/plugins/maintenance-mode/ and WP is trying to match that. Since it was closed, it's trying for the next-best match.
I think that this is, in a way, related to https://core.trac.wordpress.org/ticket/32101 - if we can flag plugins as unmanaged, they won't make those links either?
This ticket was mentioned in Slack in #meta by ocean90. View the logs.
9 years ago
#3
@
9 years ago
- Owner set to ocean90
- Status changed from new to reviewing
<?php include_once( ABSPATH . 'wp-admin/includes/plugin-install.php' ); //for plugins_api.. $api = plugins_api( 'plugin_information', array( 'slug' => 'maintenance-mode', ) ); var_dump( $api );
returns
object(WP_Error)#346 (2) { ["errors"]=> array(1) { ["plugins_api_failed"]=> array(1) { [0]=> string(219) "An unexpected error occurred. Something may be wrong with WordPress.org or this server’s configuration. If you continue to have problems, please try the support forums." } } ["error_data"]=> array(1) { ["plugins_api_failed"]=> string(2) "N;" } }
#4
@
9 years ago
- Status changed from reviewing to closed
@ocean90 Yeah, because the plugin on WordPress.org with that slug has been closed (so it's now like it doesn't exist).
This occurs through the update-check API, whereby it selects the best matching plugin (based off the slug, name, url, and author), which the plugins screen then ultimately uses. Since the plugin in the description here has 'Maintenance Mode' as it's name, that ultimately serves up a response for rocket-maintenance-mode
which is then picked up by the plugins screen and uses it's slug for the details.
#5
@
9 years ago
Note that this should be partially fixed by [dotorg:11268], as I changed it to use a slightly higher threshold, specifically to prevent slug-to-name-only matching.
Screenshot showing view details shows wrong plugin details