We are moving to Git Issues for bug tracking in future releases. During transition, content will be in both tools. If you'd like to file a new bug, please create an issue.

Bug 5414 - versions table can contain products with the wrong category for legacy plug-ins
versions table can contain products with the wrong category for legacy plug-ins
Status: NEW
Product: OJS
Classification: Unclassified
Component: Plug-ins
PC Windows XP
: P3 normal
Assigned To: PKP Support
Depends on:
  Show dependency treegraph
Reported: 2010-05-07 17:20 PDT by jerico
Modified: 2012-09-21 13:12 PDT (History)
1 user (show)

See Also:
Version Reported In:
Also Affects: OCS 2.3.4, OHS 2.3.2, OMP 1.0


Note You need to log in before you can comment on or make changes to this bug.
Description jerico 2010-05-07 17:20:41 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.
Comment 1 jerico 2010-08-24 18:15:38 PDT
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.
Comment 2 Alec Smecher 2010-08-25 10:42:06 PDT
Agreed -- deferring.