I'm having issues when trying to save a new Long Access Token from Instagram. It appears that the token is longer than the last one I had, and so it will not save.
I generate the access token from the Facebook developers dashboard, paste it in to save it, and get the following error:
PDOException: SQLSTATE[22001]: String data, right truncated: 1406 Data too long for column 'longAccessToken' at row 1 in /var/www/html/vendor/yiisoft/yii2/db/Command.php:1293
Stack trace:
#0 /var/www/html/vendor/yiisoft/yii2/db/Command.php(1293): PDOStatement->execute()
#1 /var/www/html/vendor/yiisoft/yii2/db/Command.php(1093): yii\db\Command->internalExecute('UPDATE `c_craft...')
#2 /var/www/html/vendor/yiisoft/yii2/db/ActiveRecord.php(332): yii\db\Command->execute()
#3 /var/www/html/vendor/yiisoft/yii2/db/BaseActiveRecord.php(810): yii\db\ActiveRecord::updateAll(Array, Array)
#4 /var/www/html/vendor/yiisoft/yii2/db/ActiveRecord.php(676): yii\db\BaseActiveRecord->updateInternal(NULL)
#5 /var/www/html/vendor/yiisoft/yii2/db/BaseActiveRecord.php(681): yii\db\ActiveRecord->update(true, NULL)
#6 /var/www/html/vendor/scaramangagency/craftagram/src/controllers/SettingsController.php(56): yii\db\BaseActiveRecord->save()
#7 [internal function]: scaramangagency\craftagram\controllers\SettingsController->actionSavePluginSettings()
#8 /var/www/html/vendor/yiisoft/yii2/base/InlineAction.php(57): call_user_func_array(Array, Array)
#9 /var/www/html/vendor/yiisoft/yii2/base/Controller.php(180): yii\base\InlineAction->runWithParams(Array)
#10 /var/www/html/vendor/craftcms/cms/src/web/Controller.php(189): yii\base\Controller->runAction('save-plugin-set...', Array)
#11 /var/www/html/vendor/yiisoft/yii2/base/Module.php(528): craft\web\Controller->runAction('save-plugin-set...', Array)
#12 /var/www/html/vendor/craftcms/cms/src/web/Application.php(285): yii\base\Module->runAction('craftagram/sett...', Array)
#13 /var/www/html/vendor/craftcms/cms/src/web/Application.php(588): craft\web\Application->runAction('craftagram/sett...', Array)
#14 /var/www/html/vendor/craftcms/cms/src/web/Application.php(264): craft\web\Application->_processActionRequest(Object(craft\web\Request))
#15 /var/www/html/vendor/yiisoft/yii2/base/Application.php(386): craft\web\Application->handleRequest(Object(craft\web\Request))
#16 /var/www/html/web/index.php(22): yii\base\Application->run()
#17 {main}
Next yii\db\Exception: SQLSTATE[22001]: String data, right truncated: 1406 Data too long for column 'longAccessToken' at row 1
The SQL being executed was: UPDATE `c_craftagram_settings` SET `longAccessToken`='XXXXXXQUR5OW9IbG1feDNsT3RyZAmRCemxCeFR4b3NIRWNSVDdIckdjVlR5R0tWN3dNR1owMHZArdXowbTFiWk5GWVlPbXRXN1FiZAC1TNWhNNmRmUlNOakczOEhNc2lHX0FWeHppcnhuRzNqXXXXXXXXXXXXXX', `dateUpdated`='2020-09-30 10:48:47' WHERE `id`=1 in /var/www/html/vendor/yiisoft/yii2/db/Schema.php:677
Stack trace:
#0 /var/www/html/vendor/yiisoft/yii2/db/Command.php(1298): yii\db\Schema->convertException(Object(PDOException), 'UPDATE `c_craft...')
#1 /var/www/html/vendor/yiisoft/yii2/db/Command.php(1093): yii\db\Command->internalExecute('UPDATE `c_craft...')
#2 /var/www/html/vendor/yiisoft/yii2/db/ActiveRecord.php(332): yii\db\Command->execute()
#3 /var/www/html/vendor/yiisoft/yii2/db/BaseActiveRecord.php(810): yii\db\ActiveRecord::updateAll(Array, Array)
#4 /var/www/html/vendor/yiisoft/yii2/db/ActiveRecord.php(676): yii\db\BaseActiveRecord->updateInternal(NULL)
#5 /var/www/html/vendor/yiisoft/yii2/db/BaseActiveRecord.php(681): yii\db\ActiveRecord->update(true, NULL)
#6 /var/www/html/vendor/scaramangagency/craftagram/src/controllers/SettingsController.php(56): yii\db\BaseActiveRecord->save()
#7 [internal function]: scaramangagency\craftagram\controllers\SettingsController->actionSavePluginSettings()
#8 /var/www/html/vendor/yiisoft/yii2/base/InlineAction.php(57): call_user_func_array(Array, Array)
#9 /var/www/html/vendor/yiisoft/yii2/base/Controller.php(180): yii\base\InlineAction->runWithParams(Array)
#10 /var/www/html/vendor/craftcms/cms/src/web/Controller.php(189): yii\base\Controller->runAction('save-plugin-set...', Array)
#11 /var/www/html/vendor/yiisoft/yii2/base/Module.php(528): craft\web\Controller->runAction('save-plugin-set...', Array)
#12 /var/www/html/vendor/craftcms/cms/src/web/Application.php(285): yii\base\Module->runAction('craftagram/sett...', Array)
#13 /var/www/html/vendor/craftcms/cms/src/web/Application.php(588): craft\web\Application->runAction('craftagram/sett...', Array)
#14 /var/www/html/vendor/craftcms/cms/src/web/Application.php(264): craft\web\Application->_processActionRequest(Object(craft\web\Request))
#15 /var/www/html/vendor/yiisoft/yii2/base/Application.php(386): craft\web\Application->handleRequest(Object(craft\web\Request))
#16 /var/www/html/web/index.php(22): yii\base\Application->run()
#17 {main}
Additional Information:
Array
(
[0] => 22001
[1] => 1406
[2] => Data too long for column 'longAccessToken' at row 1
)
Thanks @isjackwild. The migration from project config tracked token to database tracked token was setting ->string(150) and not ->text() as the install does.
I'm having issues when trying to save a new Long Access Token from Instagram. It appears that the token is longer than the last one I had, and so it will not save.
I generate the access token from the Facebook developers dashboard, paste it in to save it, and get the following error: