View Issue Details

IDProjectCategoryView StatusLast Update
0024715mantisbtupgradepublic2018-09-09 06:37
ReporterjingshaochenAssigned Toatrol 
PriorityhighSeveritymajorReproducibilityalways
Status resolvedResolutionno change required 
PlatformLinuxOSUbuntuOS Version16.04
Product Version2.16.0 
Target VersionFixed in Version 
Summary0024715: When upgrade from 1.2 to 2.16, mantis_config_table's php serialized string cannot be decoded as json
Description

2.16 expects field in mantis_config_table to be json encoded. However, older version used php serialize to save the config in table. Therefore, after upgrade and imported sql file from older version (1.2, I tried, don't know other versions) cannot display My View and View Issues pages. It will display an "INTERNAL APPLICATION ERROR".

Steps To Reproduce

Install 1.2, configure some customize configure view column orders, and save them to the database. Now check the database and you can see the text is something like:
a:12:{i:0;s:4:"edit";i:1;s:8:"priority";i:2;s:2:"id";i:3;s:11:"category_id";i:4;s:6:"status";i:5;s:20:"custom_project_stage";i:6;s:15:"custom_customer";i:7;s:14:"custom_country";i:8;s:12:"last_updated";i:9;s:24:"custom_salesforce.com id";i:10;s:28:"custom_salesforce deal value";i:11;s:7:"summary";}

now upgrade to 2.16 and import the database. You will see INTERNAL ERROR on both view pages.

Additional Information

filter table handles this nicely with a v8 and v9 header in the string to indicating it is a serialized or json encoded string. The fix should do the same for config table.

TagsNo tags attached.

Activities

atrol

atrol

2018-08-30 16:52

developer   ~0060565

now upgrade to 2.16 and import the database

Does it mean you run admin/install.php?
If so, the following step of the installer should have converted from PHP serialize format to JSON
https://github.com/mantisbt/mantisbt/blob/release-2.16.0/admin/schema.php#L827
https://github.com/mantisbt/mantisbt/blob/release-2.16.0/core/install_helper_functions_api.php#L665

atrol

atrol

2018-09-09 06:37

developer   ~0060625

jingshaochen,

You did not provide any feedback; I am therefore resolving this issue as "no change required".

Feel free to reopen the issue at a later time and provide the requested information.

Issue History

Date Modified Username Field Change
2018-08-30 15:05 jingshaochen New Issue
2018-08-30 16:52 atrol Status new => feedback
2018-08-30 16:52 atrol Note Added: 0060565
2018-09-09 06:37 atrol Assigned To => atrol
2018-09-09 06:37 atrol Status feedback => resolved
2018-09-09 06:37 atrol Resolution open => no change required
2018-09-09 06:37 atrol Note Added: 0060625