[wp-trac] [WordPress Trac] #10352: Plugin Update API returns duplicate sections

WordPress Trac wp-trac at lists.automattic.com
Tue Jul 7 18:10:28 UTC 2009


#10352: Plugin Update API returns duplicate sections
---------------------------+------------------------------------------------
 Reporter:  TobiasBg       |       Owner:  ryan      
     Type:  defect (bug)   |      Status:  new       
 Priority:  normal         |   Milestone:  Unassigned
Component:  WordPress.org  |     Version:            
 Severity:  normal         |    Keywords:            
---------------------------+------------------------------------------------
 A plugin in the WP Extend repository may have a section "Changelog" in its
 readme.txt since a few weeks ([http://westi.wordpress.com/2009/06/20
 /changelogs-changelogs-changelogs/ link]).

 Heiko Rabe, the author of [http://wordpress.org/extend/plugins
 /codestyling-localization/ Codestyling Localization] just added such a
 section to the [http://plugins.trac.wordpress.org/browser/codestyling-
 localization/tags/1.90/readme.txt readme.txt] of the latest release of his
 plugin.
 Unfortunately he made a small typo: "Change Log" instead of "Changelog".
 (This means it can actually happen with any plugin, I just noticed it
 here.)

 This leads to a bug in the answer of the Plugin Update API, when viewing
 the plugin_information screen before installing/updating a plugin (the one
 that opens inside a thickbox).
 URL: http://EXAMPLE.COM/wp-admin/plugin-install.php?tab=plugin-
 information&plugin=codestyling-localization

 Although there actually is no section "Changelog" in the readme.txt (but a
 "Change Log"), it get's displayed as such. When viewing the section
 "Change Log" only the short plugin description is shown.
 See attached screenshot for what I mean.

 I tracked this down to
 {{{
 $api = plugins_api('plugin_information', array('slug' => stripslashes(
 $_REQUEST['plugin'] ) ));
 }}}
 in the function install_plugin_information() in /wp-admin/includes/plugin-
 install.php.

 This lets me come to the conclusion, that the information comes from the
 Plugin Update API at http://api.wordpress.org/plugins/info/1.0/.

 I suggest to make the API a little bit more robust for such a typo and of
 course only make it process one "Changelog" section.

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/10352>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list