XF\Db\DuplicateKeyException: Job Truonglv\ImageOptimizer\Job\Optimizer: MySQL query error [1062]: Duplicate entry '2-attachment_data' for key 'content' src/XF/Db/AbstractStatement.php:217
Generated by: Unknown account 5 Dec 2018 at 18:50
Stack trace
INSERT INTO `tl_image_optimizer_log` (`new_size`, `old_size`, `processed_time`, `content_id`, `content_type`, `log_date`) VALUES (?, ?, ?, ?, ?, ?)
------------
#0 src/XF/Db/Mysqli/Statement.php(196): XF\Db\AbstractStatement->getException('MySQL query err...', 1062, '23000')
#1 src/XF/Db/Mysqli/Statement.php(77): XF\Db\Mysqli\Statement->getException('MySQL query err...', 1062, '23000')
#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 `t...', Array)
#4 src/XF/Mvc/Entity/Entity.php(1440): XF\Db\AbstractAdapter->insert('tl_image_optimi...', Array, false)
#5 src/XF/Mvc/Entity/Entity.php(1172): XF\Mvc\Entity\Entity->_saveToSource()
#6 src/addons/Truonglv/ImageOptimizer/ContentData/AbstractData.php(27): XF\Mvc\Entity\Entity->save(false)
#7 src/addons/Truonglv/ImageOptimizer/Job/Optimizer.php(110): Truonglv\ImageOptimizer\ContentData\AbstractData->log('attachment_data', 2, Array)
#8 src/addons/Truonglv/ImageOptimizer/Job/Optimizer.php(51): Truonglv\ImageOptimizer\Job\Optimizer->processImages(Array, 'attachment_data', Object(XF\Timer), 2)
#9 src/XF/Job/Manager.php(253): Truonglv\ImageOptimizer\Job\Optimizer->run(G)
#10 src/XF/Job/Manager.php(195): XF\Job\Manager->runJobInternal(Array, G)
#11 src/XF/Job/Manager.php(79): XF\Job\Manager->runJobEntry(Array, G)
#12 job.php(42): XF\Job\Manager->runQueue(false, 8)
#13 {main}
Request state
array(4) {
["url"] => string(8) "/job.php"
["referrer"] => string(31) "https://streamweb.io/whats-new/"
["_GET"] => array(0) {
}
["_POST"] => array(0) {
}
}