Fixed Error on Fresh Install XF 2.3.0 Beta 7

TBolley

Active member
Affected version
2..3.0 Beta 7
On Install XF 2.3.0 B7 get on Install this Error :

Code:
XF\Db\Exception: MySQL statement prepare error [1054]: Unknown column 'usable_with_oauth_clients' in 'field list' in src\XF\Db\AbstractStatement.php at line 230
XF\Db\AbstractStatement->getException() in src\XF\Db\Mysqli\Statement.php at line 198
XF\Db\Mysqli\Statement->getException() in src\XF\Db\Mysqli\Statement.php at line 40
XF\Db\Mysqli\Statement->prepare() in src\XF\Db\Mysqli\Statement.php at line 56
XF\Db\Mysqli\Statement->execute() in src\XF\Db\AbstractAdapter.php at line 96
XF\Db\AbstractAdapter->query() in src\XF\Db\AbstractAdapter.php at line 219
XF\Db\AbstractAdapter->insert() in src\XF\Mvc\Entity\Entity.php at line 1558
XF\Mvc\Entity\Entity->_saveToSource() in src\XF\Mvc\Entity\Entity.php at line 1290
XF\Mvc\Entity\Entity->save() in src\XF\AddOn\DataType\ApiScope.php at line 70
XF\AddOn\DataType\ApiScope->importAddOnData() in src\XF\Job\AddOnData.php at line 110
XF\Job\AddOnData->run() in src\XF\Job\Atomic.php at line 40
XF\Job\Atomic->run() in src\XF\Job\Manager.php at line 272
XF\Job\Manager->runJobInternal() in src\XF\Job\Manager.php at line 202
XF\Job\Manager->runJobEntry() in src\XF\Job\Manager.php at line 153
XF\Job\Manager->runUnique() in src\XF\Install\Controller\AbstractController.php at line 24
XF\Install\Controller\AbstractController->manualJobRunner() in src\XF\Install\Controller\Install.php at line 199
XF\Install\Controller\Install->actionRunJob() in src\XF\Mvc\Dispatcher.php at line 352
XF\Mvc\Dispatcher->dispatchClass() in src\XF\Mvc\Dispatcher.php at line 258
XF\Mvc\Dispatcher->dispatchFromMatch() in src\XF\Mvc\Dispatcher.php at line 115
XF\Mvc\Dispatcher->dispatchLoop() in src\XF\Mvc\Dispatcher.php at line 57
XF\Mvc\Dispatcher->run() in src\XF\App.php at line 2604
XF\App->run() in src\XF.php at line 533
XF::runApp() in install\index.php at line 14
 
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.3.0 Beta 8).

Change log:
Fix missing column in API scope install data
There may be a delay before changes are rolled out to the XenForo Community.
 
You may fix this by adding the following line beneath line 183 of src/XF/Install/Data/MySql.php:
PHP:
            $table->addColumn('usable_with_oauth_clients', 'tinyint', 3)->setDefault(1);

The final result should look like:
PHP:
        $tables['xf_api_scope'] = function (Create $table)
        {
            $table->addColumn('api_scope_id', 'varbinary', 50);
            $table->addColumn('usable_with_oauth_clients', 'tinyint', 3)->setDefault(1);
            $table->addColumn('addon_id', 'varbinary', 50)->setDefault('');
            $table->addPrimaryKey('api_scope_id');
        };
 
Back
Top Bottom