Last active
August 2, 2021 10:59
-
-
Save mikesname/38470e10de9e3afec485b8379381e8c9 to your computer and use it in GitHub Desktop.
Revisions
-
mikesname renamed this gist
Aug 2, 2021 . 1 changed file with 0 additions and 0 deletions.There are no files selected for viewing
File renamed without changes. -
mikesname revised this gist
Aug 2, 2021 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -8,7 +8,7 @@ Problem: Error in Apache logs: 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 /var/www/helpdesk.ehri-project.eu/include/class.orm.php:1364 Stack trace: -
mikesname revised this gist
Aug 2, 2021 . 1 changed file with 1 addition and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -11,6 +11,7 @@ Error in Apache logs: 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 /var/www/helpdesk.ehri-project.eu/include/class.orm.php:1364 Stack trace: #0 /var/www/helpdesk.ehri-project.eu/include/class.orm.php(607): QuerySet->one() #1 /var/www/helpdesk.ehri-project.eu/include/staff/templates/thread-entries.tmpl.php(37): VerySimpleModel::lookup(Array) #2 /var/www/helpdesk.ehri-project.eu/include/class.thread.php(408): include('/var/www/helpde...') -
mikesname renamed this gist
Aug 2, 2021 . 1 changed file with 0 additions and 0 deletions.There are no files selected for viewing
File renamed without changes. -
mikesname created this gist
Aug 2, 2021 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,56 @@ OSTicket Duplicate email debugging ================================== Problem: - Threads not being show when opening ticket - No JS or other apparent UI errors Error in Apache logs: 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 /var/www/helpdesk.ehri-project.eu/include/class.orm.php:1364 Stack trace: #0 /var/www/helpdesk.ehri-project.eu/include/class.orm.php(607): QuerySet->one() #1 /var/www/helpdesk.ehri-project.eu/include/staff/templates/thread-entries.tmpl.php(37): VerySimpleModel::lookup(Array) #2 /var/www/helpdesk.ehri-project.eu/include/class.thread.php(408): include('/var/www/helpde...') #3 /var/www/helpdesk.ehri-project.eu/include/staff/ticket-view.inc.php(759): Thread->render(Array, Array) #4 /var/www/helpdesk.ehri-project.eu/scp/tickets.php(539): require_once('/var/www/helpde...') #5 {main}\n thrown in /var/www/helpdesk.ehri-project.eu/include/class.orm.php on line 1364', referer: https://helpdesk.ehri-project.eu/scp/tickets.php?id=5714 Current workaround derived from here: https://forum.osticket.com/d/97956-cant-see-ticket-content Query to detect duplicate emails: ```sql SELECT thread_entry_id, COUNT(thread_entry_id) FROM ost_thread_entry_email GROUP BY thread_entry_id HAVING COUNT(thread_entry_id) > 1; ``` Back up the existing table: ```sql CREATE TABLE ost_thread_entry_email_backup SELECT * FROM ost_thread_entry_email; ``` Delete duplicates: ```sql DELETE t1 FROM ost_thread_entry_email t1 INNER JOIN ost_thread_entry_email t2 WHERE t1.id < t2.id AND t1.thread_entry_id = t2.thread_entry_id; ```