View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0021376 | mantisbt | upgrade | public | 2016-07-19 04:52 | 2018-07-30 00:57 |
Reporter | jki | Assigned To | dregad | ||
Priority | normal | Severity | block | Reproducibility | have not tried |
Status | closed | Resolution | fixed | ||
Product Version | 1.3.0 | ||||
Target Version | 2.16.0 | Fixed in Version | 2.16.0 | ||
Summary | 0021376: Error in upgrade process 1.2.17 --> 1.3.0 | ||||
Description | Hello, we have an error in our upgrade process from MantisBT Version 1.2.17 to 1.3.0. When executing the install.php (/admin/install.php), we get the error "Schema step 195: UpdateFunction ( stored_filter_migrate ) - BAD" in step "Installing Database". We could not fix that error. We tried to delete database entry "status_enum_workflow" from table "mantis_config_table" with no result. Thank you! | ||||
Tags | No tags attached. | ||||
Attached Files | |||||
That can't fix the issue. To analyze your issue, the output of this statements is needed. Please do not attach screen shots of the result. |
|
Hello Thank your for your support. Is it possible to send the file to you by mail, because of data privacy? |
|
|
|
Hello You can find the files in Issue 0021379. |
|
Hello You can find the new file in Issue 0021379. Thank you! |
|
Same problem here. Everything seems to work fine, except filtering. |
|
Just realized, 21379 was intentionally private :D They all look like this: v9#{"_version":"v9","_view_type":"simple","per_page":50,"highlight_changed":6,"sort":"last_updated","dir":"DESC","start_month":"03","start_day":1,"start_year":"2010","end_month":"03","end_day":"26","end_year":"2010","search":"","view_state":0,"relationship_type":-1,"relationship_bug":0,"reporter_id":[0],"handler_id":[0],"hide_status":[90],"fixed_in_version":["0"],"custom_fields":{"5":["0"],"9":["0"],"7":["0"],"10":["0"],"6":["0"],"2":["0"],"1":["0"],"4":["0"],"3":["0"],"12":[0],"15":[0],"18":[0],"13":[0],"11":[0],"17":[0],"16":[0],"14":[0],"19":[0]},"sticky":"on","platform":["0"],"os":["0"],"os_build":["0"],"project_id":[-3],"filter_by_date":false,"tag_string":"","tag_select":"","match_type":0,"category_id":[0],"severity":[0],"status":[0],"note_user_id":[0],"resolution":[0],"priority":[0],"build":[0],"version":[0],"target_version":["0"],"monitor_user_id":[0],"profile_id":[0]} |
|
I found some entries which seem to have broken JSON: {s:8:"_version";s:2:"v7";s:10:"_view_type";s:8:"advanced";s:13:"show_category";a:1:{i:0;s:1:"0";}s:13:"show_severity";a:1:{i:0;i:0;}s:11:"show_status";a:3:{i:0;i:10;i:1;i:40;i:2;i:50;}s:8:"per_page";i:50;s:17:"highlight_changed";i:6;s:11:"reporter_id";a:1:{i:0;i:0;}s:10:"handler_id";a:5:{i:0;i:-2;i:1;i:-1;i:2;i:5;i:3;i:41;i:4;i:6;}s:4:"sort";s:17:"priority,severity";s:3:"dir";s:9:"DESC,DESC";s:11:"start_month";i:4;s:9:"start_day";i:1;s:10:"start_year";i:2011;s:9:"end_month";i:4;s:7:"end_day";i:8;s:8:"end_year";i:2011;s:6:"search";s:0:"";s:11:"hide_status";a:1:{i:0;i:-2;}s:16:"and_not_assigned";b:0;s:15:"show_resolution";a:1:{i:0;i:0;}s:10:"show_build";a:1:{i:0;s:1:"0";}s:12:"show_version";a:1:{i:0;s:1:"0";}s:17:"do_filter_by_date";b:0;s:16:"fixed_in_version";a:1:{i:0;s:1:"0";}s:13:"show_priority";a:1:{i:0;i:0;}s:12:"user_monitor";a:1:{i:0;i:0;}s:10:"view_state";i:0;s:13:"custom_fields";a:13:{i:5;a:1:{i:0;s:1:"0";}i:12;a:1:{i:0;s:1:"0";}i:9;a:1:{i:0;s:1:"0";}i:7;a:3:{i:0;s:0:"";i:1;s:1:"1";i:2;s:1:"1";}i:10;a:1:{i:0;s:1:"0";}i:6;a:1:{i:0;s:5:" 100%";}i:2;a:1:{i:0;s:1:"0";}i:13;a:1:{i:0;s:1:"0";}i:11;a:1:{i:0;s:1:"0";}i:1;a:1:{i:0;s:1:"0";}i:14;a:1:{i:0;s:1:"0";}i:4;a:1:{i:0;s:1:"0";}i:3;a:1:{i:0;s:1:"0";}}s:13:"sticky_issues";s:3:"off";s:17:"relationship_type";i:-1;s:16:"relationship_bug";i:0;s:12:"show_profile";a:1:{i:0;i:0;}} How can I tell Mantis to ignore those which cannot be converted? |
|
Filters from earlier versions are not stored in JSON
You have to change source of function install_stored_filter_migrate |
|
I see they were simply serialized. if( $t_filter_arr === false ) { How can I log the ID of the corrupted filter? |
|
You can find the invalid filter entries if you change file core/install_helper_functions_api.php and change it to The upgrade will stop if an invalid filter occurs and you will see the id of the filter. |
|
Sorry @jki, I deleted accidentally issue 21379 when cleaning up spam. Sorry guys, I have to set the issue tracker in read-only mode again, as the spamming does not stop. |
|
From @aust via IRC |
|
Seems like serialization was moved to json in version 1.2 Those serialized filter strings should have also failed somehow if the user was using 1.2.17 |
|
I've been following this thread. I'm having the same issue updating from 1.0.8 to 1.3. |
|
aust changed function install_stored_filter_migrate() |
|
Same problem on a 1.2.18 upgrade with a schema version 183... Schema step 195: UpdateFunction ( stored_filter_migrate ) BAD So, i've drop all values of the mantis_filters_table an then the update runs perfectly... :) |
|
UPDATE : After making a dump with AUTO-INCREMENT informations on the dump file, the upgrade from 1.2.18 with a schema version 183 is working without any problem |
|
Note that the improvement just committed does not actually fix the issue, it just gives the Admin more detailed information to allow them to take proper corrective action. |
|
MantisBT: master 086f3104 2018-06-20 02:39 Details Diff |
Upgrade: improve handling of unserialize errors Merging PR https://github.com/mantisbt/mantisbt/pull/1359 In MantisBT 1.3, the method used to store config, token and filter data changed from serialize to JSON. Upgrade steps 193, 194 and 195 were added to convert legacy data to the new format. This frequently caused the upgrade process to fail when unserialize() could not interpret the data, but the MantisBT installer just aborted without providing any useful information to the admin. This improves the error reporting, clearly identifying the offending record so that the admin can take appropriate action to fix the problem. Fixes 0024416, 0021376 (and maybe others too) |
Affected Issues 0021376, 0024416 |
|
mod - core/error_api.php | Diff File | ||
mod - core/install_helper_functions_api.php | Diff File | ||
mod - core/utility_api.php | Diff File |