Duplicate Error on Upgrading to 2.0

MattW

Well-known member
Affected version
2.0 Beta 1
So, just tried upgrading the RM, and the error with ES crashed the upgrade during the rebuild (HERE)

It's showing that the RM can still be upgraded, but when I try again, it's now saying the old RM table no longer exists.

Code:
XF\Db\Exception: MySQL query error [1146]: Table 'xf2.xf_resource' doesn't exist in src/XF/Db/AbstractStatement.php at line 183
XF\Db\AbstractStatement->getException() in src/XF/Db/Mysqli/Statement.php at line 66
XF\Db\Mysqli\Statement->execute() in src/XF/Db/AbstractAdapter.php at line 67
XF\Db\AbstractAdapter->query() in src/XF/Db/AbstractAdapter.php at line 94
XF\Db\AbstractAdapter->fetchAllKeyed() in src/XF/Db/SchemaManager.php at line 92
XF\Db\SchemaManager->getTableColumnDefinitions() in src/XF/Db/Schema/Alter.php at line 30
XF\Db\Schema\Alter->__construct() in src/XF/Db/SchemaManager.php at line 211
XF\Db\SchemaManager->newAlter() in src/XF/Db/SchemaManager.php at line 145
XF\Db\SchemaManager->renameTable() in src/addons/XFRM/Setup.php at line 290
XFRM\Setup->upgrade2000010Step1() in src/XF/AddOn/StepRunnerUpgradeTrait.php at line 143
XFRM\Setup->upgradeStepRunner() in src/XF/AddOn/StepRunnerUpgradeTrait.php at line 79
XFRM\Setup->upgrade() in src/XF/Admin/Controller/AddOn.php at line 424
XF\Admin\Controller\AddOn->actionUpgrade() in src/XF/Mvc/Dispatcher.php at line 232
XF\Mvc\Dispatcher->dispatchClass() in src/XF/Mvc/Dispatcher.php at line 85
XF\Mvc\Dispatcher->dispatchLoop() in src/XF/Mvc/Dispatcher.php at line 41
XF\Mvc\Dispatcher->run() in src/XF/App.php at line 1771
XF\App->run() in src/XF.php at line 319
XF::runApp() in admin.php at line 13

I'm guessing that during the upgrade, it's removing the old RM tables?
 
So, just tried upgrading the RM, and the error with ES crashed the upgrade during the rebuild (HERE)

It's showing that the RM can still be upgraded, but when I try again, it's now saying the old RM table no longer exists.

Code:
XF\Db\Exception: MySQL query error [1146]: Table 'xf2.xf_resource' doesn't exist in src/XF/Db/AbstractStatement.php at line 183
XF\Db\AbstractStatement->getException() in src/XF/Db/Mysqli/Statement.php at line 66
XF\Db\Mysqli\Statement->execute() in src/XF/Db/AbstractAdapter.php at line 67
XF\Db\AbstractAdapter->query() in src/XF/Db/AbstractAdapter.php at line 94
XF\Db\AbstractAdapter->fetchAllKeyed() in src/XF/Db/SchemaManager.php at line 92
XF\Db\SchemaManager->getTableColumnDefinitions() in src/XF/Db/Schema/Alter.php at line 30
XF\Db\Schema\Alter->__construct() in src/XF/Db/SchemaManager.php at line 211
XF\Db\SchemaManager->newAlter() in src/XF/Db/SchemaManager.php at line 145
XF\Db\SchemaManager->renameTable() in src/addons/XFRM/Setup.php at line 290
XFRM\Setup->upgrade2000010Step1() in src/XF/AddOn/StepRunnerUpgradeTrait.php at line 143
XFRM\Setup->upgradeStepRunner() in src/XF/AddOn/StepRunnerUpgradeTrait.php at line 79
XFRM\Setup->upgrade() in src/XF/Admin/Controller/AddOn.php at line 424
XF\Admin\Controller\AddOn->actionUpgrade() in src/XF/Mvc/Dispatcher.php at line 232
XF\Mvc\Dispatcher->dispatchClass() in src/XF/Mvc/Dispatcher.php at line 85
XF\Mvc\Dispatcher->dispatchLoop() in src/XF/Mvc/Dispatcher.php at line 41
XF\Mvc\Dispatcher->run() in src/XF/App.php at line 1771
XF\App->run() in src/XF.php at line 319
XF::runApp() in admin.php at line 13

I'm guessing that during the upgrade, it's removing the old RM tables?
I had the same problem with XFMG.
The tables don't exist in my DB. in my XF1.5 DB they exist. I guess they were deleted with the upgrade or something...
They still exist, they seems to have another prefix.
Code:
XF\Db\Exception: MySQL query error [1146]: Table 'test_xf2_rfnet.xengallery_album' doesn't exist in src/XF/Db/AbstractStatement.php at line 183
XF\Db\AbstractStatement->getException() in src/XF/Db/Mysqli/Statement.php at line 66
XF\Db\Mysqli\Statement->execute() in src/XF/Db/AbstractAdapter.php at line 67
XF\Db\AbstractAdapter->query() in src/XF/Db/AbstractAdapter.php at line 94
XF\Db\AbstractAdapter->fetchAllKeyed() in src/XF/Db/SchemaManager.php at line 92
XF\Db\SchemaManager->getTableColumnDefinitions() in src/XF/Db/Schema/Alter.php at line 30
XF\Db\Schema\Alter->__construct() in src/XF/Db/SchemaManager.php at line 211
XF\Db\SchemaManager->newAlter() in src/XF/Db/SchemaManager.php at line 145
XF\Db\SchemaManager->renameTable() in src/addons/XFMG/Setup.php at line 632
XFMG\Setup->upgrade902000010Step1() in src/XF/AddOn/StepRunnerUpgradeTrait.php at line 143
XFMG\Setup->upgradeStepRunner() in src/XF/AddOn/StepRunnerUpgradeTrait.php at line 79
XFMG\Setup->upgrade() in src/XF/Admin/Controller/AddOn.php at line 424
XF\Admin\Controller\AddOn->actionUpgrade() in src/XF/Mvc/Dispatcher.php at line 232
XF\Mvc\Dispatcher->dispatchClass() in src/XF/Mvc/Dispatcher.php at line 85
XF\Mvc\Dispatcher->dispatchLoop() in src/XF/Mvc/Dispatcher.php at line 41
XF\Mvc\Dispatcher->run() in src/XF/App.php at line 1771
XF\App->run() in src/XF.php at line 319
XF::runApp() in admin.php at line 13
 
Last edited:
If you're trying again (as in from the add-on list), this isn't really totally surprising as the system is in an undefined state (the upgrade has been partially applied). If you get an error while upgrading, then ideally you'd want to stay in that position to try to get it resolved.

Regardless, it looks like the error is related to an unrelated job, though that shouldn't actually be triggered here so we will look into that, but that's a generally independent issue.

We do have a separate bug for potentially tracking the upgrade starting over, though the exact situation isn't 100% clear yet: https://xenforo.com/community/threads/error-upgrading-to-rm-2-0.133493/ The most likely thing will be to try with beta 2 when released as there are various changes which may be relevant.

On that basis, I will close this (as a duplicate though it's hard to say if that's 100% true).
 
My error happened because it couldn't write to internal_data/code_cache
After
Code:
chmod -R 777 data
chmod -R 777 internal_data
No problems anymore.
But I had to do that several times during installation. Everytime after using the cli to copy or running the upgrade.
 
Top Bottom