SYS INFO

osTicket Version v1.14.1 (f1e9e88)
Web Server Software Apache/2.4.39 (Win64) PHP/7.2.18
MySQL Version 10.2.8
PHP Version 7.2.18

PHP ERROR LOG

When trying to create a new ticket I get error 500, in the osticket log it shows no error but in the PHP log it sends the following

[02-Jan-2020 17:14:00 UTC] PHP Fatal error: Uncaught ObjectNotUnique: One object was expected; however multiple objects in the database matched the query. In fact, there are 2 matching objects. in C:\wamp64\www\tickets\upload\include\class.orm.php:1363
Stack trace:
#0 C:\wamp64\www\tickets\upload\include\class.orm.php(606): QuerySet->one()
#1 C:\wamp64\www\tickets\upload\include\class.list.php(297): VerySimpleModel::lookup(Array)
#2 C:\wamp64\www\tickets\upload\include\class.list.php(384): DynamicList->getConfigurationForm(true)
#3 C:\wamp64\www\tickets\upload\include\class.dynamic_forms.php(1624): DynamicList->getForm()
#4 C:\wamp64\www\tickets\upload\include\class.dynamic_forms.php(541): SelectionField->hasSubFields()
#5 C:\wamp64\www\tickets\upload\include\class.filter.php(295): Bootstrap::{closure}()
#6 C:\wamp64\www\tickets\upload\include\class.filter.php(308): Filter::getSupportedMatches()
#7 C:\wamp64\www\tickets\upload\include\class.filter.php(706): Filter::getSupportedMatchFields()
#8 C:\wamp64\www\tickets\upload\include\class.ticket.php(3930) in C:\wamp64\www\tickets\upload\include\class.orm.php on line 1363

    Yes, I already tried from another browser and from another computer and the problem persists, in the php error log it throws me the following

    [02-Jan-2020 18:08:03 UTC] PHP Fatal error: Uncaught ObjectNotUnique: One object was expected; however multiple objects in the database matched the query. In fact, there are 2 matching objects. in C:\wamp64\www\tickets\upload\include\class.orm.php:1363
    Stack trace:
    #0 C:\wamp64\www\tickets\upload\include\class.orm.php(606): QuerySet->one()
    #1 C:\wamp64\www\tickets\upload\include\class.list.php(297): VerySimpleModel::lookup(Array)
    #2 C:\wamp64\www\tickets\upload\include\class.list.php(384): DynamicList->getConfigurationForm(true)
    #3 C:\wamp64\www\tickets\upload\include\class.dynamic_forms.php(1624): DynamicList->getForm()
    #4 C:\wamp64\www\tickets\upload\include\class.dynamic_forms.php(541): SelectionField->hasSubFields()
    #5 C:\wamp64\www\tickets\upload\include\class.filter.php(295): Bootstrap::{closure}()
    #6 C:\wamp64\www\tickets\upload\include\class.filter.php(308): Filter::getSupportedMatches()
    #7 C:\wamp64\www\tickets\upload\include\class.filter.php(706): Filter::getSupportedMatchFields()
    #8 C:\wamp64\www\tickets\upload\include\class.ticket.php(3930) in C:\wamp64\www\tickets\upload\include\class.orm.php on line 1363

    @emmanuelbd

    You have a duplicate List in your database somehow. Go to ost_list table and ensure no two records have the same ID. Also, go to your ost_form_field table and ensure that no two records have the same type and form_id values. (eg. make sure you don't have two records like type = list-1 AND form_id = 1)

    Cheers.

    Write a Reply...