MG 2.1 Problem upgrading from 1.1.17 to 2.1.0

Joe Link

Well-known member
I just upgraded from 1.5.23 to 2.1.0. Tried to install Media Gallery and I'm getting this error. How do I resolve this?

Code:
XF\Db\Exception: xf_mg_category: MySQL query error [1054]: Unknown column 'category_description' in 'xf_mg_category' in src/XF/Db/AbstractStatement.php at line 217
XF\Db\AbstractStatement->getException() in src/XF/Db/Mysqli/Statement.php at line 196
XF\Db\Mysqli\Statement->getException() in src/XF/Db/Mysqli/Statement.php at line 77
XF\Db\Mysqli\Statement->execute() in src/XF/Db/AbstractAdapter.php at line 89
XF\Db\AbstractAdapter->query() in src/XF/Db/Schema/AbstractDdl.php at line 151
XF\Db\Schema\AbstractDdl->apply() in src/XF/Db/SchemaManager.php at line 149
XF\Db\SchemaManager->alterTable() in src/addons/XFMG/Setup.php at line 644
XFMG\Setup->upgrade902000010Step3() in src/XF/AddOn/StepRunnerUpgradeTrait.php at line 122
XFMG\Setup->upgradeStepRunner() in src/XF/AddOn/StepRunnerUpgradeTrait.php at line 71
XFMG\Setup->upgrade() in src/XF/Admin/Controller/AddOn.php at line 575
XF\Admin\Controller\AddOn->actionUpgrade() in src/XF/Mvc/Dispatcher.php at line 321
XF\Mvc\Dispatcher->dispatchClass() in src/XF/Mvc/Dispatcher.php at line 248
XF\Mvc\Dispatcher->dispatchFromMatch() in src/XF/Mvc/Dispatcher.php at line 100
XF\Mvc\Dispatcher->dispatchLoop() in src/XF/Mvc/Dispatcher.php at line 50
XF\Mvc\Dispatcher->run() in src/XF/App.php at line 2177
XF\App->run() in src/XF.php at line 390
XF::runApp() in admin.php at line 13
 
Are you able to look at the database table?

Can you see a column in the table named description?

If you can, that would explain the error, but it would also suggest that this database has been upgraded from XFMG 1.1.x to XFMG 2.x already in the past. The easiest thing to do is to rename that column back to category_description if you can and then the process should complete, but if the database is in an inconsistent state due to some previous attempt at upgrading, or some mistake while restoring a database backup or previous testing or similar then you may well find more issues as the process continues.
 
Are you able to look at the database table?

Can you see a column in the table named description?

If you can, that would explain the error, but it would also suggest that this database has been upgraded from XFMG 1.1.x to XFMG 2.x already in the past. The easiest thing to do is to rename that column back to category_description if you can and then the process should complete, but if the database is in an inconsistent state due to some previous attempt at upgrading, or some mistake while restoring a database backup or previous testing or similar then you may well find more issues as the process continues.

Thanks for the reply @Chris D.

It's odd, I can assure you this DB has never been upgraded or attempted to be upgraded.

I renamed the description field in xf_mg_category to category_description and I was able to get a little further before coming upon this error. I can't seem to locate a field list table.

Code:
XF\Db\Exception: MySQL statement prepare error [1054]: Unknown column 'upload_user_groups' in 'field list' in src/XF/Db/AbstractStatement.php at line 217
XF\Db\AbstractStatement->getException() in src/XF/Db/Mysqli/Statement.php at line 196
XF\Db\Mysqli\Statement->getException() in src/XF/Db/Mysqli/Statement.php at line 39
XF\Db\Mysqli\Statement->prepare() in src/XF/Db/Mysqli/Statement.php at line 54
XF\Db\Mysqli\Statement->execute() in src/XF/Db/AbstractAdapter.php at line 89
XF\Db\AbstractAdapter->query() in src/XF/Db/AbstractAdapter.php at line 116
XF\Db\AbstractAdapter->fetchAllKeyed() in src/addons/XFMG/Setup.php at line 662
XFMG\Setup->upgrade902000010Step3() in src/XF/AddOn/StepRunnerUpgradeTrait.php at line 122
XFMG\Setup->upgradeStepRunner() in src/XF/AddOn/StepRunnerUpgradeTrait.php at line 71
XFMG\Setup->upgrade() in src/XF/Admin/Controller/AddOn.php at line 575
XF\Admin\Controller\AddOn->actionUpgrade() in src/XF/Mvc/Dispatcher.php at line 321
XF\Mvc\Dispatcher->dispatchClass() in src/XF/Mvc/Dispatcher.php at line 248
XF\Mvc\Dispatcher->dispatchFromMatch() in src/XF/Mvc/Dispatcher.php at line 100
XF\Mvc\Dispatcher->dispatchLoop() in src/XF/Mvc/Dispatcher.php at line 50
XF\Mvc\Dispatcher->run() in src/XF/App.php at line 2177
XF\App->run() in src/XF.php at line 390
XF::runApp() in admin.php at line 13
 
Are you able to look at the database table?

Can you see a column in the table named description?

If you can, that would explain the error, but it would also suggest that this database has been upgraded from XFMG 1.1.x to XFMG 2.x already in the past. The easiest thing to do is to rename that column back to category_description if you can and then the process should complete, but if the database is in an inconsistent state due to some previous attempt at upgrading, or some mistake while restoring a database backup or previous testing or similar then you may well find more issues as the process continues.

Got it figured out. Did a test install of 2.1, removed the files, installed 1.5, and upgraded to 2.1. Forgot to drop the original 2.1 DB :rolleyes:
 
Back
Top Bottom