You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We're getting the following PHP error in our logs:
PHP Fatal error: Uncaught InconsistentModelException: Unable to prepare query: Unknown column 'Q7.attachment_count' in 'where clause' SELECT A1.number AS number, A1.ticket_id AS ticket_id, A1.source AS source, A1.ticket_pid AS ticket_pid, A1.flags AS flags, A1.created AS created, A3.subject AS cdata__subject, A1.isoverdue AS isoverdue, A4.name AS user__name, A3.priority AS cdata__priority, A5.firstname AS staff__firstname, A5.lastname AS staff__lastname, A6.name AS team__name, A1.team_id AS team_id, (SELECT COUNT(R1.id) AS count FROM ost_thread Q7 JOIN ost_ticket Q8 ON (Q7.object_type = 'T' AND Q7.object_id = Q8.ticket_id) LEFT JOIN ost_thread_entry R0 ON (Q7.id = R0.thread_id) LEFT JOIN ost_attachment R1 ON (R1.type = 'H' AND R0.id = R1.object_id) WHERE Q8.ticket_id = A1.ticket_id AND R1.inline = 0) AS attachment_count, A1.isanswered = '0' AS 2GkBZxz, (SELECT COUNT(R0.id) AS count FROM ost_thread Q7 JOIN ost_ticket Q8 ON (Q7.object_type = 'T' AND Q7.object_id = Q8.ticket_id) LEFT JOIN ost_thread_entry R0 ON (Q7.id = R0.thread_id) WHERE Q8.ticket_id = A1.ticket_id AND NOT R0.flags & 4 != 0) AS _thread_count, (SELECT COUNT(R1.id) AS count FROM ost_thread Q7 JOIN ost_ticket Q8 ON (Q7.object_type = 'T' AND Q7.object_id = Q8.ticket_id) LEFT JOIN ost_thread_entry R0 ON (Q7.id = R0.thread_id) LEFT JOIN ost_attachment R1 ON (R1.type = 'H' AND R0.id = R1.object_id) WHERE Q8.ticket_id = A1.ticket_id AND R1.inline = 0) AS _att_count, COALESCE(A5.firstname, A5.lastname, A6.name, 'zzz') AS assignee FROM ost_ticket A1 JOIN (SELECT Q7.ticket_id, Z1.relevance AS relevance FROM ost_ticket Q7 JOIN ost_ticket_status Q8 ON (Q7.status_id = Q8.id) LEFT JOIN ost_thread R0 ON (R0.object_type = 'T' AND Q7.ticket_id = R0.object_id) LEFT JOIN ost_thread_referral R1 ON (R0.id = R1.thread_id) LEFT JOIN ost_staff R2 ON (R1.object_type = 'S' AND R1.object_id = R2.staff_id) LEFT JOIN ost_thread R3 ON (Q7.ticket_id = R3.object_id AND R3.object_type = 'C') LEFT JOIN ost_thread_referral R4 ON (R3.id = R4.thread_id) LEFT JOIN ost_staff R5 ON (R4.object_type = 'S' AND R4.object_id = R5.staff_id) LEFT JOIN ost_department R6 ON (R1.object_type = 'D' AND R1.object_id = R6.id) LEFT JOIN ost_department R7 ON (R4.object_type = 'D' AND R4.object_id = R7.id) JOIN (SELECT COALESCE(Z3.object_id, Z5.ticket_id, Z8.ticket_id) as ticket_id, Z1.relevance FROM (SELECT Z1.object_id, Z1.object_type, MATCH (Z1.title, Z1.content) AGAINST (159365 IN NATURAL LANGUAGE MODE) AS relevance FROM ost__search Z1 WHERE MATCH (Z1.title, Z1.content) AGAINST (159365 IN NATURAL LANGUAGE MODE) ORDER BY relevance DESC) Z1 LEFT JOIN ost_thread_entry Z2 ON (Z1.object_type = 'H' AND Z1.object_id = Z2.id) LEFT JOIN ost_thread Z3 ON (Z2.thread_id = Z3.id AND (Z3.object_type = 'T' OR Z3.object_type = 'C')) LEFT JOIN ost_ticket Z5 ON (Z1.object_type = 'T' AND Z1.object_id = Z5.ticket_id) LEFT JOIN ost_user Z6 ON (Z6.id = Z1.object_id and Z1.object_type = 'U') LEFT JOIN ost_organization Z7 ON (Z7.id = Z1.object_id AND Z7.id = Z6.org_id AND Z1.object_type = 'O') LEFT JOIN ost_ticket Z8 ON (Z8.user_id = Z6.id)) Z1 WHERE Q7.attachment_count = 1 AND Q7.ticket_id = Z1.ticket_id AND ((Q8.state = 'open' AND (Q7.staff_id = 9 OR R2.staff_id = 9 OR R3.object_type = 'C' AND R5.staff_id = 9)) OR Q7.dept_id IN (1, 3) OR R6.id IN (1, 3) OR R3.object_type = 'C' AND R7.id IN (1, 3)) ORDER BY Z1.relevance LIMIT 500) A2 LEFT JOIN ost_ticket__cdata A3 ON (A1.ticket_id = A3.ticket_id) LEFT JOIN ost_user A4 ON (A1.user_id = A4.id) LEFT JOIN ost_staff A5 ON (A1.staff_id = A5.staff_id) LEFT JOIN ost_team A6 ON (A1.team_id = A6.team_id) WHERE A1.ticket_id = A2.ticket_id GROUP BY A1.ticket_id ORDER BY A1.created DESC, relevance DESC LIMIT 50 in /include/class.orm.php:3485
Stack trace:
#0 /include/class.orm.php(3531): MySqlExecutor->execute() #1 /include/class.orm.php(2104): MySqlExecutor->getArray() #2 /include/class.orm.php(2054): HashArrayIterator->{closure}() #3 /include/class.orm.php(2033): CallbackSimpleIterator->next() #4 /include/class.orm.php(2042): CallbackSimpleIterator->rewind() #5 /include/class.orm.php(1713): CallbackSimpleIterator->valid() #6 /include/class.orm.php(1723): CachedResultSet->fillTo() #7 /include/class.orm.php(1739): CachedResultSet->asArray() #8 /include/staff/templates/queue-tickets.tmpl.php(258): CachedResultSet->getIterator() #9 /scp/tickets.php(569): require_once('...') #10 {main}
thrown in /include/class.orm.php on line 3485
Unfortunately I haven't yet worked out how to replicate the issue, but I'm hoping that the details in the error message above may be sufficient to identify the cause.
Versions
osTicket 1.17.5
Debian 12.4
PHP 8.2
MariaDB 10.11
The text was updated successfully, but these errors were encountered:
Description
We're getting the following PHP error in our logs:
Unfortunately I haven't yet worked out how to replicate the issue, but I'm hoping that the details in the error message above may be sufficient to identify the cause.
Versions
The text was updated successfully, but these errors were encountered: