Matt C.
Well-known member
In one my add-ons, I'm getting the following error:
To give some context about the error, my add-on retrieves JSON information and saves it into the database. Is there anything I can do to fix this?
Thank you very much.
Code:
XF\Db\Exception: MySQL query error [1406]: Data too long for column 'topic' at row 1 src\XF\Db\AbstractStatement.php:217
Generated by: Unknown account Dec 16, 2018 at 11:53 PM
Stack trace
INSERT INTO `xf_ah_dev_tracker_entry` (`entry_id`, `timestamp`, `service`, `username`, `name`, `nick`, `role`, `content`, `content_stripped`, `url`, `topic`, `topicUrl`) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
------------
#0 src\XF\Db\Mysqli\Statement.php(196): XF\Db\AbstractStatement->getException('MySQL query err...', 1406, '22001')
#1 src\XF\Db\Mysqli\Statement.php(77): XF\Db\Mysqli\Statement->getException('MySQL query err...', 1406, '22001')
#2 src\XF\Db\AbstractAdapter.php(89): XF\Db\Mysqli\Statement->execute()
#3 src\XF\Db\AbstractAdapter.php(172): XF\Db\AbstractAdapter->query('INSERT INTO `x...', Array)
#4 src\XF\Mvc\Entity\Entity.php(1446): XF\Db\AbstractAdapter->insert('xf_ah_dev_track...', Array, false)
#5 src\XF\Mvc\Entity\Entity.php(1178): XF\Mvc\Entity\Entity->_saveToSource()
#6 src\addons\AH\DevTracker\Repository\Entry.php(132): XF\Mvc\Entity\Entity->save()
#7 src\addons\AH\DevTracker\Cron\DevTracker.php(12): AH\DevTracker\Repository\Entry->importDevData()
#8 [internal function]: AH\DevTracker\Cron\DevTracker::run(Object(XF\Entity\CronEntry))
#9 src\XF\Job\Cron.php(35): call_user_func(Array, Object(XF\Entity\CronEntry))
#10 src\XF\Job\Manager.php(253): XF\Job\Cron->run(G)
#11 src\XF\Job\Manager.php(195): XF\Job\Manager->runJobInternal(Array, G)
#12 src\XF\Job\Manager.php(79): XF\Job\Manager->runJobEntry(Array, G)
#13 job.php(42): XF\Job\Manager->runQueue(false, 8)
#14 {main}
Request state
array(4) {
["url"] => string(8) "/job.php"
["referrer"] => string(26) "http://localhost/index.php"
["_GET"] => array(0) {
}
["_POST"] => array(0) {
}
}
To give some context about the error, my add-on retrieves JSON information and saves it into the database. Is there anything I can do to fix this?
Thank you very much.