View Issue Details

IDProjectCategoryView StatusLast Update
0022715mantisbtplug-inspublic2017-04-23 10:55
Reporterdregad Assigned Todregad  
PrioritylowSeveritymajorReproducibilityalways
Status closedResolutionduplicate 
Product Version1.3.0-beta.1 
Summary0022715: Use of 'mantis' as plugin table prefix prevents plugin's installation
Description

If $db_table_plugin_prefix is set to 'mantis', database API's db_get_table() function will incorrectly process a plugin's tables as if they were legacy tables (i.e. 'Mantis 1.2 style', with a mantis_ prefix).

If $db_table_suffix also is not set to _table, then the generated table name will be incorrect (e.g. with the Source Integration plugin, bug table will be generated as mantis_Sou_suffix instead of mantis_mantis_Source_bug_suffix, and changeset mantis_Source_ch_suffix instead of mantis_mantis_Source_changeset_suffix), causing an invalid installation by plugin_upgrade().

Note that Mantis will trigger a deprecated warning in this case, but depending user's error reporting settings it may not be shown.

Steps To Reproduce
  1. set $db_table_plugin_prefix = 'mantis';
  2. set $db_table_suffix = 'suffix';
  3. Install the Source Integration Plugin

Installation fails

APPLICATION ERROR #2503
Upgrading the plugin schema failed in block #12.

Tables are created with invalid names

+----------------------------------------------------+
| Tables_in_bugtracker                               |
+----------------------------------------------------+
| mantis_Sou_suffix                                  |
| mantis_Sour_suffix                                 |
| mantis_Source_ch_suffix                            |
| mantis_Source_rep_suffix                           |
| mantis_Source_suffix                               |
Additional Information

Originally reported in https://github.com/mantisbt-plugins/source-integration/issues/212

TagsNo tags attached.

Relationships

duplicate of 0020168 closeddregad Use of 'mantis' as plugin table prefix prevents plugin's installation 

Activities

cproensa

cproensa

2017-04-12 08:08

developer   ~0056502

I think it's roughly the same as 0020168

dregad

dregad

2017-04-12 08:21

developer   ~0056503

I think it's roughly the same as 0020168

Forgot about it :-/