Closed angelandasi closed 2 years ago
I'm facing the same issue:
[INSERT INTO config
SET key
= 'last-run', value
= 1666195289, updated
= NOW()] Duplicate entry 'last-run' for key 'namespace'
---- Backtrace ----
#0 (root)/include/mysqli.php(203): osTicket->logDBError()
#1 (root)/include/class.orm.php(3482): db_query()
#2 (root)/include/class.orm.php(658): MySqlExecutor->execute()
#3 (root)/include/class.config.php(176): VerySimpleModel->save()
#4 (root)/include/class.config.php(109): ConfigItem->save()
#5 (root)/include/class.config.php(119): Config->create()
#6 (root)/include/class.config.php(84): Config->update()
#7 (root)/include/plugins/plugin-autocloser-master/class.CloserPlugin.php(188): Config->set()
#8 (root)/include/plugins/plugin-autocloser-master/class.CloserPlugin.php(79): CloserPlugin->is_time_to_run()
#9 (root)/include/plugins/plugin-autocloser-master/class.CloserPlugin.php(68): CloserPlugin->logans_run_mode()
#10 (root)/include/class.signal.php(98): CloserPlugin->{closure}()
#11 (root)/include/class.cron.php(123): Signal::send()
#12 (root)/include/api.cron.php(19): Cron::run()
#13 (root)/include/api.cron.php(40): CronApiController->run()
#14 (root)/api/cron.php(23): LocalCronApiController::call()
#15 {main
Please let me know your findings
Thank you @extent-ops. It worked for me after following your instructions on #45 issue. It was a bit confusing for me due to all the different message, so I decide to add here wath I changed. This is what I changed (in yellow):
Near line 54
and near line 81
and near line 200
@angelandasi I followed your instructions, but still not working. class.CloserPlugin.txt
I simply followed some of the instructions on https://github.com/clonemeagain/plugin-autocloser/issues/45. And it worked for me.
Hi, I just upgraded to the version 1.17 of osTicket. Since then, I am getting DB Error #1062 in osTicket logs every 5 minutes. The error shows autocloser plugin folder and class.CloserPlugin.php. So I guess it is related to this plugin. I disabled the plugin and I don't get the error log anamore.
Does anyone know what I can do to make it work again? Thank you in advance.
Our osTicket settings:
osTicket Version | v1.17 (1d8b790) — Up to date Web Server Software | Apache/2.4.37 () OpenSSL/1.1.1g Phusion_Passenger/6.0.6 MySQL Version | 5.7.34 PHP Version | 8.0.11
This is the entire log message I am getting:
DB Error #1062 [INSERT INTO
hgjv_config
SETkey
= 'last-run',value
= 1666085703,updated
= NOW()] Duplicate entry 'last-run' for key 'namespace'---- Backtrace ----
0 (root)/include/mysqli.php(203): osTicket->logDBError('DB Error #1062', '[INSERT INTO h...')
1 (root)/include/class.orm.php(3482): db_query('INSERT INTO `hg...', true, true)
2 (root)/include/class.orm.php(658): MySqlExecutor->execute()
3 (root)/include/class.config.php(176): VerySimpleModel->save(true)
4 (root)/include/class.config.php(109): ConfigItem->save()
5 (root)/include/class.config.php(119): Config->create('last-run', 1666085703)
6 (root)/include/class.config.php(84): Config->update('last-run', 1666085703)
7 (root)/include/plugins/autocloser/class.CloserPlugin.php(203): Config->set('last-run', 1666085703)
8 (root)/include/plugins/autocloser/class.CloserPlugin.php(85): CloserPlugin->is_time_to_run(Object(CloserPluginConfig))
9 (root)/include/plugins/autocloser/class.CloserPlugin.php(68): CloserPlugin->logans_run_mode()
10 (root)/include/class.signal.php(98): CloserPlugin->{closure}(NULL, Array)
11 (root)/include/class.cron.php(123): Signal::send('cron', NULL, Array)
12 (root)/include/api.cron.php(19): Cron::run()
13 (root)/include/api.cron.php(40): CronApiController->run()
14 (root)/api/cron.php(23): LocalCronApiController::call()
15 {main}