MG 2.0 Media Gallery 2.0.0 Beta 1 - Upgrade Errors

Neal

Well-known member
I'm getting this error when trying to upgrade the media gallery from version 1.1.13:

Code:
XF\Db\Exception: MySQL query error [1146]: Table 'mydatabase.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

I'm getting this error when I disable and enable it, even though it does appear to enable and disable it:

Code:
League\Flysystem\FileExistsException: File already exists at path: file_check/temp-file-check-1.json in src/vendor/league/flysystem/src/Filesystem.php at line 401
League\Flysystem\Filesystem->assertAbsent() in src/vendor/league/flysystem/src/Filesystem.php at line 65
League\Flysystem\Filesystem->write()
call_user_func_array() in src/vendor/league/flysystem-eventable-filesystem/src/EventableFilesystem.php at line 431
League\Flysystem\EventableFilesystem\EventableFilesystem->callFilesystemMethod() in src/vendor/league/flysystem-eventable-filesystem/src/EventableFilesystem.php at line 395
League\Flysystem\EventableFilesystem\EventableFilesystem->delegateMethodCall() in src/vendor/league/flysystem-eventable-filesystem/src/EventableFilesystem.php at line 247
League\Flysystem\EventableFilesystem\EventableFilesystem->write()
call_user_func_array() in src/vendor/league/flysystem/src/MountManager.php at line 269
League\Flysystem\MountManager->invokePluginOnFilesystem() in src/vendor/league/flysystem/src/MountManager.php at line 179
League\Flysystem\MountManager->__call() in src/XF/Job/FileCheck.php at line 136
XF\Job\FileCheck->run() in src/XF/Job/Manager.php at line 193
XF\Job\Manager->runJobInternal() in src/XF/Job/Manager.php at line 140
XF\Job\Manager->runJobEntry() in src/XF/Job/Manager.php at line 76
XF\Job\Manager->runQueue() in src/XF/Admin/Controller/Tools.php at line 105
XF\Admin\Controller\Tools->actionRunJob() 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 couldn't post this without first selecting a prefix and 2.0.0 wasn't available :)
 
I'm getting this error when trying to upgrade the media gallery from version 1.1.13:
That would suggest that the xengallery_album table is missing from your database, and that's a fairly important one.

You may need to restore a backup and make sure the Gallery is working before performing the upgrade (especially anything related to albums). Getting that error suggests your Gallery installation is broken anyway.

I'm getting this error when I disable and enable it, even though it does appear to enable and disable it:
See the Resolved bug reports forum for a fix for this.
 
That would suggest that the xengallery_album table is missing from your database, and that's a fairly important one.

You may need to restore a backup and make sure the Gallery is working before performing the upgrade (especially anything related to albums). Getting that error suggests your Gallery installation is broken anyway.


See the Resolved bug reports forum for a fix for this.

It's stating the table is called 'mydatabase.xengallery_album' - should it not be called 'xengallery_album' ?

The gallery was working fine before the update. Is there a way to remove the gallery without reverting to a backup if need be as everything else on the site appears fine and dandy, ie. Forums and resources.
 
To make the error as clear as possible, it prepends the database name to the table name. Presumably mydatabase is your correct database name?

Does the xengallery_album table actually exist in the database at the point this error happens?
 
To make the error as clear as possible, it prepends the database name to the table name. Presumably mydatabase is your correct database name?

Does the xengallery_album table actually exist in the database at the point this error happens?

Thanks, @Chris D - No, the only gallery tables showing are 'xf_mg_whatever'

Just to add that i'm happy to remove the gallery and reinstall as there are only 4 or 5 images on it (the uninstall option does not show though).
 
We do believe this is a genuine bug in our installer code. Another user has reported the same issue upgrading the RM.

I believe you can resolve the uninstall issue by removing the directory src/addons/XFMG. The add-on will no longer be "upgradeable" and instead appear to be a "legacy" add-on. That should allow you to uninstall it.

You'd then need to remove all of the tables that begin with xf_mg_ and any columns that appear in the xf_user table with either a prefix of xengallery_ or xfmg_

Ideally, though, you'd just restore from a backup but if this is just for testing purposes and will eventually be thrown away anyway maybe it won't be an issue for now.
 
Back
Top Bottom