I tried to use the advanced search function.I have not done anything essential.Suddenly I get this database error.I can not do anything anymore.No matter which site I call, I always get this error.What can I do ?Fatal error: Uncaught exception 'InconsistentModelException'

with message 'Unable to prepare query: SELECT COUNT(*) FROM (SELECT

A1.`ticket_id` FROM `OC1_ticket` A1 WHERE ) __' in

/var/www/XXXXXXXX/include/class.orm.php

Stack trace:

#0

/var/www/XXXXXXXX/include/class.orm.php(3189):

MySqlExecutor->execute()

#1

/var/www/XXXXXXXX/include/class.orm.php(2644):

MySqlExecutor->getRow()

#2

/var/www/vhosts/XXXXXXXX/include/class.orm.php(1193):

MySqlCompiler->compileCount(Object(QuerySet))

#3

/var/www/XXXXXXXX/scp/tickets.php(525):

QuerySet->count()

#4

/var/www/XXXXXXXX/scp/index.php(28):

require('/var/www/vhosts...')

#5 {main}

thrown in /var/www/vhosts/XXXXXXXX/include/class.orm.php on line 3134

After debuging, I coud fix it with adding onceunset ($_SESSION);on Line 517 in the File /scp/tickets.phpBut this is definitly a bug!After playing around with advanced serach the system writes any crap in the $_SESSION that it is not able to handle.

Please see:https://github.com/osTicket/osTicket/issues/4318

Thank you for your answer.But this Link could not have todo anything with my case.There is some crap in $_SESSION and the system builts a broken where clause.When I add unset ($_SESSION); Is works again.

@[deleted]What version of osTicket is the issue in?Cheers.

Write a Reply...