PKP Bugzilla – Bug 5414
versions table can contain products with the wrong category for legacy plug-ins
Last modified: 2012-09-21 13:12:15 PDT
The versions table can attribute the wrong category to a product (=plug-in) when there's no version.xml that specifies the category explicitly.
This happens if all the following conditions are fulfilled:
- A generic plug-in hooks into the PluginRegistry::loadPlugin() hook and adds a plug-in via this hook to another category.
- This other category comes alphabetically after the generic category (e.g. importexport).
- The generic plug-in does not provide a version.xml
Under these conditions, the versions table will not contain the "generic" category but the category of the dynamically added plug-in.
The code responsible for this lives in Upgrade.inc.php and Install.inc.php:
$pluginVersion = new Version(
1, 0, 0, 0, Core::getCurrentDate(), 1,
'plugins.'.$category, basename($plugin->getPluginPath()), '', 0
This bug does not have any actual impact currently but it leads to wrong data in the versions table and this might lead to problems one day.
Alec, I'm putting that one back on the plate for you to decide whether this is grave enough so that it has to be fixed in 2.3.3. IMO we can defer this to 2.3.4 also.
Agreed -- deferring.