Hello,
I was using this great CRM for years now as an ordinary user and not an experienced developer, lately I migrated to my new server, all functions works except for "Creating New Ticket" I got "500 internal server error" and as it's a generic error, I enabled error display by editing "bootstrap.php" display_startup_errors and 'display_errors' set to 1 and it throws the following error:
Fatal error: Uncaught ObjectNotUnique: One object was expected; however multiple objects in the database matched the query. In fact, there are 85 matching objects. in /home/taberp/support.tab-erp.com/include/class.orm.php:1363 Stack trace: #0 /home/taberp/support.tab-erp.com/include/class.orm.php(728): QuerySet->one() #1 /home/taberp/support.tab-erp.com/include/class.orm.php(696): VerySimpleModel->refetch() #2 /home/taberp/support.tab-erp.com/include/class.ticket.php(3618): VerySimpleModel->save(true) #3 /home/taberp/support.tab-erp.com/include/class.ticket.php(4303): Ticket->save() #4 /home/taberp/support.tab-erp.com/open.php(42): Ticket::create(Array, Array, 'Web') #5 {main} thrown in /home/taberp/support.tab-erp.com/include/class.orm.php on line 1363
1) I changed the PHP version from 7.1 (which works on remote server) with no luck.
2) I increased the values of php.ini files with no luck.
3) I checked error under cPanel Logs and I got:
[Tue Dec 13 21:46:20.106569 2022] [:error] [pid 15126:tid 22895604008704] [client 102.47.106.246:50938] [client 102.47.106.246] ModSecurity: Warning. Match of "rx ^$" against "FILES_TMPNAMES:upload[]" required. [file "/etc/apache2/conf.d/modsec_vendor_configs/imunify360-minimal-apache/000_i360_0.conf"] [line "152"] [id "77317957"] [msg "IM360 WAF: Track file uploadFile:/tmp//20221213-214619-Y5jyq5TPf3O4sXAMh5cxXgAAARI-file-8NNVyRSize:97337User:taberpSC:/home/taberp/support.tab-erp.com/ajax.phpT:APACHE"] [severity "NOTICE"] [tag "service_i360custom"] [tag "noshow"] [hostname "support.tab-erp.com"] [uri "/ajax.php/form/upload/ticket/attach"] [unique_id "Y5jyq5TPf3O4sXAMh5cxXgAAARI"], referer: https://support.tab-erp.com/open.php
4) I disabled Imunify Mod security but doesn't make a different.
So I checked users table but due to large numbers of records I can't find the duplicate records.
Any help will be appreciated