View Issue Details

IDProjectCategoryView StatusLast Update
0028918mantisbtupgradepublic2021-07-16 19:03
Reporterthabsheer.pk Assigned To 
PriorityhighSeveritymajorReproducibilityhave not tried
Status newResolutionopen 
Summary0028918: upgrade mantis 1.2.4 to 2.25.2
Description

'd tried to upgrade and got some errors. I have attached a picture of the error shown. Could you please tell me what is the issue?

After my research, I deleted some rows from mantis_config_table and mantis_filters_table
delete from mantis_config_table where type=3
It worked but found bugs in workflow transitions (can't see the statuses) .

Please share what is the exact way to fix this issue.

TagsNo tags attached.

Activities

thabsheer.pk

thabsheer.pk

2021-07-15 09:31

reporter  

DELETED ROWS.JPG (66,685 bytes)   
DELETED ROWS.JPG (66,685 bytes)   
Schema 193 error.JPG (206,323 bytes)   
Schema 193 error.JPG (206,323 bytes)   
dregad

dregad

2021-07-15 17:47

developer   ~0065692

delete from mantis_config_table where type=3

This removes all "complex" types from your config, which is like using a nuke to kill a mosquito... probably explains the workflow transition errors you're experiencing too. Don't do that.

The upgrade process is normally quite specific about the config which is causing a problem during upgrade; looking at the provided screenshot, the issue is with the private_bug_threshold record for all projects/all users, which apparently contains a json-encoded array of values, while the installer expects serialized data (a:4:{i:0;i:10;i:1;i:55;i:2;i:70;i:3;i:90;}). You can delete the record or manually fix it as appropriate, then re-run the upgrade.

thabsheer.pk

thabsheer.pk

2021-07-16 05:26

reporter   ~0065693

As you said, I deleted the 'private_bug_threshold' record for all projects/all users.

But, after that, it is shown the next error, and I deleted another record, and it continued for 15+ records. So I deleted all complex type values.

Now I imported the deleted rows into the mantis_config_table after the upgrade, it seems to work fine but still some of the complex values are showing NULL and in the database, these items have values.

ARRAY VALUES.JPG (64,021 bytes)   
ARRAY VALUES.JPG (64,021 bytes)   
NULL.JPG (49,031 bytes)   
NULL.JPG (49,031 bytes)   
dregad

dregad

2021-07-16 19:03

developer   ~0065694

Now I imported the deleted rows into the mantis_config_table after the upgrade

Thus undoing the upgrade script's processing, which as you can imagine, is there for a reason - in this case converting complex values storage, from legacy PHP serialized data, to JSON.

You get NULLs, because Mantis is not able to interpret the serialized data as JSON.

So either keep going through the iterative process as you've been doing 15 times, until the installer continues, or devise your own conversion script based on install_check_config_serialization() function (in install_helper_functions_api.php).

I'll check if the upgrade process can be improved to process all data and report errors at the end, instead of aborting after the first error.