Fixed Media Gallery Upgrade 1.1.15 -> 2.2 Beta 4

FloV

Well-known member
Affected version
2.2 B4
When upgrading from 1.1.15 to 2.2 Beta 4 i get the following upgrade error:

XF\Db\Exception: Batch install error: MySQL query error [1364]: Field 'advanced' doesn't have a default value src/XF/Db/AbstractStatement.php:228
Erstellt von: Florian_PL 25 August 2020 um 17:58


Stapelverfolgung​

INSERT INTO xf_option (option_id, option_value, default_value, edit_format, edit_format_params, data_type, sub_options, validation_class, validation_method) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?)
------------

#0 src/XF/Db/Mysqli/Statement.php(196): XF\Db\AbstractStatement->getException('MySQL query err...', 1364, 'HY000')
#1 src/XF/Db/Mysqli/Statement.php(77): XF\Db\Mysqli\Statement->getException('MySQL query err...', 1364, 'HY000')
#2 src/XF/Db/AbstractAdapter.php(94): XF\Db\Mysqli\Statement->execute()
#3 src/XF/Db/AbstractAdapter.php(218): XF\Db\AbstractAdapter->query('INSERT INTO `x...', Array)
#4 src/addons/XFMG/Setup.php(915): XF\Db\AbstractAdapter->insert('xf_option', Array)
#5 src/XF/AddOn/StepRunnerUpgradeTrait.php(122): XFMG\Setup->upgrade902000010Step6(Array)
#6 src/XF/AddOn/StepRunnerUpgradeTrait.php(71): XFMG\Setup->upgradeStepRunner(902000010, 6, Array, 902000032)
#7 src/XF/Job/AddOnInstallBatch.php(297): XFMG\Setup->upgrade(Array)
#8 src/XF/Job/AddOnInstallBatch.php(89): XF\Job\AddOnInstallBatch->stepAction(Object(XF\Timer))
#9 src/XF/Job/Manager.php(258): XF\Job\AddOnInstallBatch->run(G)
#10 src/XF/Job/Manager.php(200): XF\Job\Manager->runJobInternal(Array, G)
#11 src/XF/Job/Manager.php(116): XF\Job\Manager->runJobEntry(Array, G)
#12 src/XF/Admin/Controller/Tools.php(120): XF\Job\Manager->runByIds(Array, 8)
#13 src/XF/Mvc/Dispatcher.php(350): XF\Admin\Controller\Tools->actionRunJob(Object(XF\Mvc\ParameterBag))
#14 src/XF/Mvc/Dispatcher.php(257): XF\Mvc\Dispatcher->dispatchClass('XF:Tools', 'RunJob', Object(XF\Mvc\RouteMatch), Object(SV\UserMentionsImprovements\XF\Admin\Controller\Tools), NULL)
#15 src/XF/Mvc/Dispatcher.php(113): XF\Mvc\Dispatcher->dispatchFromMatch(Object(XF\Mvc\RouteMatch), Object(SV\UserMentionsImprovements\XF\Admin\Controller\Tools), NULL)
#16 src/XF/Mvc/Dispatcher.php(55): XF\Mvc\Dispatcher->dispatchLoop(Object(XF\Mvc\RouteMatch))
#17 src/XF/App.php(2298): XF\Mvc\Dispatcher->run()
#18 src/XF.php(464): XF\App->run()
#19 admin.php(13): XF::runApp('XF\\Admin\\App')
#20 {main}
 
You are upgrading from a very old version. I think I have read here somewhere that you have to upgrade first to 2.0 and then you can upgrade to latest version.
 
No, you can upgrade from 2.0 to the latest version. The upgrade process goes through each version.

Is not the XFMG version the OP mentioned for the XF1? Upgrading from XF1 version to XF2.2 I guess is bridged by XF2.0 is it not?
 
You can upgrade from any version of XF to any version of XF. And you can upgrade from any version of the XF add-ons to any version of the XF add-ons so the version is not an issue.

I have moved this from XFMG bugs to XF bugs btw because I think it's an issue with the schema change in XF 2.2 to add the new advanced mode column to options.
 
Sorry, I should also probably tell you how to workaround this for now.

Edit the file src/addons/XFMG/Setup.php and change (line 915):
PHP:
'validation_method' => ''

To:

PHP:
'validation_method' => '',
'advanced' => 0

Once the upgrade is complete you can safely revert the change to avoid file health check errors.
 
You can upgrade from any version of XF to any version of XF. And you can upgrade from any version of the XF add-ons to any version of the XF add-ons so the version is not an issue.

I do not know where I read that before but I am certain I read it here somewhere. :confused:

Or was it for the really old versions of XF! Please stop me from spreading rumors smh
 
Thank you for reporting this issue, it has now been resolved. We are aiming to include any changes that have been made in a future XF release (2.2.0 Beta 5).

Change log:
Set a default value for the advanced column in options and option groups
There may be a delay before changes are rolled out to the XenForo Community.
 
Top Bottom