View Issue Details

IDProjectCategoryView StatusLast Update
0026596mantisbtinstallationpublic2020-03-15 15:23
Reporterobmsch Assigned Todregad  
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionfixed 
Product Version2.23.0 
Target Version2.23.1Fixed in Version2.23.1 
Summary0026596: Wrong defaults for db (plugin) table prefix/suffix
Description

Starting with 2.23.0 the defaults are all 'mantis'. Before (<=2.22.2) they were 'mantis', 'plugin' and '_table'.
I guess this is unintended.

TagsNo tags attached.
Attached Files
Install_2_22_2.png (21,824 bytes)   
Install_2_22_2.png (21,824 bytes)   
Install_2_23_0.png (22,079 bytes)   
Install_2_23_0.png (22,079 bytes)   

Relationships

related to 0026664 closeddregad Allow admin to reset table pre/suffix to their default values 

Activities

atrol

atrol

2020-01-15 08:57

developer   ~0063436

@dregad it would be good to have this targetted to 2.23.1
https://github.com/dregad/mantisbt/commit/210d5409ecf1f83ad3b33cc5799e23f81887d8bb

obmsch

obmsch

2020-01-15 10:28

reporter   ~0063437

@dregad I noticed that, when I checked for db-schema changes installing with 'adodb-5.21' (current master).
Only one found (that's with mssqlnative):

custom_field.possible_values
5.20: [text] NULL
5.21: [text] NOT NULL, Default ''

That's expected after the recent changes to BLOB handling for some dbs. I don't use custom fields myself,
but we should keep an eye on this to not get regressions on mantis.

dregad

dregad

2020-01-15 10:59

developer   ~0063438

@obmsch definitely unintended !

As @atrol pointed out, I was already aware of this problem and fixed it a few days ago. The patch is ready, but not merged in main repository as I was also working on a few other issues in the same area, and I have not finished testing.

Thanks for opening the issue, I was planning to do it myself.

dregad

dregad

2020-01-15 11:18

developer   ~0063441

we should keep an eye on this to not get regressions on mantis

Thanks for the heads up !
I opened 0026599 to track this and other potential issues related to ADOdb 5.21.0 upgrade.

dregad

dregad

2020-01-15 11:27

developer   ~0063442

Last edited: 2020-01-15 11:46

The regression was introduced by MantisBT master 86eb8dec
I blame PHPStorm ;-)

The root cause is a change on the span tags storing the default values for the prefix/suffix, switching from name to id, and the id was of course not unique on the page since it was used for both the oci8 and other defaults.

Related Changesets

MantisBT: master 86eb8dec

2019-09-04 02:19

dregad


Details Diff
Fix invalid HTML

- remove stray </table> tag
- 'name' is not a valid attribute for <span>, replace by 'id'
- remove deprecated <table> attributes
Affected Issues
0026596
mod - admin/install.php Diff File
mod - js/install.js Diff File

MantisBT: master 85a30e9a

2020-01-06 04:49

dregad


Details Diff
Fix DB prefix/suffix init for new Mantis installs

When installing a new MantisBt instance, the installer pre-fills the
database prefix, plugin-prefix and suffix inputs.

Due to a bug in the code, all 3 fields were set to the value of
db_table_prefix ('mantis' by default), resulting in the installer
creating tables like 'mantis_bug_mantis` or 'mantis_mantis_xxx_mantis'
instead of 'mantis_bug_table' or 'mantis_plugin_xxx_table' unless the
administrator noticed and fixed the values before launching the install.

Adjust the code that initializes the inputs to use the correct values
(db_table_plugin_prefix, db_table_suffix).

Fixes 0026596
Affected Issues
0026596
mod - admin/install.php Diff File

MantisBT: master 2b98c4e4

2020-01-07 05:32

dregad


Details Diff
Install: fix default prefix change by DB type

The JavaScript that changes the default table prefix/suffix based on
database type and populates the sample table name fields was broken
because multiple DOM elements with the same id existed on the page
(2 sets of hidden <span> for the default values, and the 3 <input>).

Changing the markup for the <span> to set a class instead of an id, and
ajusting the script fixed the problem.

Fixes 0026596
Affected Issues
0026596
mod - admin/install.php Diff File
mod - js/install.js Diff File