KevinTheJedi Took me a minute, since we don't use Git here to manage OSticket, but I added the string that dumps the SQL query into the browser.
I'll try to include as much info as I can...
In the browser console window SCRIPT1004: SCRIPT1004: Expected ';'
No errors in IIS.
No errors that I can see in PHP.
No errors in OSTicket logs, unless there's hidden logging outside of the admin panel.
Running the query manually (after removing in(1) at the end of this query) it returns nothing as well.
The query:
SELECT A1.
numberAS
number, A1.
ticket_idAS
ticket_id, A1.
sourceAS
source, A1.
ticket_pidAS
ticket_pid, A1.
flagsAS
flags, A1.
createdAS
created, C1.
subjectAS
cdatasubject, A1.
isoverdueAS
isoverdue, A5.
nameAS
username, C1.
priorityAS
cdatapriority, C2.
firstnameAS
stafffirstname, C2.
lastnameAS
stafflastname, C3.
nameAS
teamname, A1.
team_idAS
team_id, MAX(A4.
value) AS
entriesanswers!36value, MAX(A8.
value) AS
userorgentriesanswers!87value, A1.
isanswered= '0' AS
2GkBZxz, (SELECT COUNT(R0.
id) AS
countFROM
ost_threadQ7 JOIN
ost_ticketQ8 ON (Q7.
object_type= 'T' AND Q7.
object_id= Q8.
ticket_id) LEFT JOIN
ost_thread_entryR0 ON (Q7.
id= R0.
thread_id) WHERE Q8.
ticket_id= A1.
ticket_idAND NOT R0.
flags& 4 != 0) AS _thread_count, (SELECT COUNT(R1.
id) AS
countFROM
ost_threadQ7 JOIN
ost_ticketQ8 ON (Q7.
object_type= 'T' AND Q7.
object_id= Q8.
ticket_id) LEFT JOIN
ost_thread_entryR0 ON (Q7.
id= R0.
thread_id) LEFT JOIN
ost_attachmentR1 ON (R1.
type= 'H' AND R0.
id= R1.
object_id) WHERE Q8.
ticket_id= A1.
ticket_idAND R1.
inline= 0) AS _att_count, COALESCE(C2.
lastname, C2.
firstname, C3.
name, 'zzz') AS
assigneeFROM
ost_ticketA1 JOIN
ost_ticket_statusA2 ON (A1.
status_id= A2.
id) JOIN
ost_form_entryA3 ON (A3.
object_type= 'T' AND A1.
ticket_id= A3.
object_id) LEFT JOIN
ost_form_entry_valuesA4 ON (A3.
id= A4.
entry_idAND A4.
field_id= 36) JOIN
ost_userA5 ON (A1.
user_id= A5.
id) LEFT JOIN
ost_organizationA6 ON (A5.
org_id= A6.
id) LEFT JOIN
ost_form_entryA7 ON (A6.
id= A7.
object_idAND A7.
object_type= 'O') LEFT JOIN
ost_form_entry_valuesA8 ON (A7.
id= A8.
entry_idAND A8.
field_id= 87) LEFT JOIN
ost_threadB0 ON (B0.
object_type= 'T' AND A1.
ticket_id= B0.
object_id) LEFT JOIN
ost_thread_referralB1 ON (B0.
id= B1.
thread_id) LEFT JOIN
ost_staffB2 ON (B1.
object_type= 'S' AND B1.
object_id= B2.
staff_id) LEFT JOIN
ost_threadB3 ON (A1.
ticket_id= B3.
object_idAND B3.
object_type= 'C') LEFT JOIN
ost_thread_referralB4 ON (B3.
id= B4.
thread_id) LEFT JOIN
ost_staffB5 ON (B4.
object_type= 'S' AND B4.
object_id= B5.
staff_id) LEFT JOIN
ost_teamB6 ON (B1.
object_type= 'E' AND B1.
object_id= B6.
team_id) LEFT JOIN
ost_teamB7 ON (B4.
object_type= 'E' AND B4.
object_id= B7.
team_id) LEFT JOIN
ost_departmentB8 ON (B1.
object_type= 'D' AND B1.
object_id= B8.
id) LEFT JOIN
ost_departmentC0 ON (B4.
object_type= 'D' AND B4.
object_id= C0.
id) LEFT JOIN
ost_ticket__cdataC1 ON (A1.
ticket_id= C1.
ticket_id) LEFT JOIN
ost_staffC2 ON (A1.
staff_id= C2.
staff_id) LEFT JOIN
ost_teamC3 ON (A1.
team_id= C3.
team_id) WHERE A2.
idIN (1, 3) AND A2.
stateIN ('open', 'closed') AND A1.
dept_id= 1 AND A1.
topic_id= 23 AND A4.
valueREGEXP '\"?1489(\"|,|$)|\"?717(\"|,|$)|\"?741(\"|,|$)|\"?752(\"|,|$)|\"?780(\"|,|$)|\"?798(\"|,|$)|\"?809(\"|,|$)' AND A8.
valueREGEXP '\"?1874(\"|,|$)|\"?1875(\"|,|$)' AND ((A2.
state= 'open' AND (A1.
staff_id= 103 OR B2.
staff_id= 103 OR B3.
object_type= 'C' AND B5.
staff_id= 103 OR A1.
team_idIN (12) OR B6.
team_idIN (12) OR B3.
object_type= 'C' AND B7.
team_idIN (12))) OR A1.
dept_idIN (1, 13) OR B8.
idIN (1, 13) OR B3.
object_type= 'C' AND C0.
idIN (1, 13)) GROUP BY A1.
ticket_idORDER BY A1.
createdDESC LIMIT 50int(1)