Good afternoon, since last week we have a new installation going on our synology server, I have only been doing some setup and tests to figure out the application works, up until today everything was ok, today I was going over the email settings and templates without any major problems, then suddenly I started to receive the same error (down attached) by email several times, any help is well received!

[SELECT A3.staff_id AS lock__staff_id, A1.staff_id AS staff_id, A1.isoverdue AS isoverdue, A1.team_id AS team_id, A1.ticket_id AS ticket_id, A1.number AS number, A4.subject AS cdata__subject, A6.address AS user__default_email__address, A1.source AS source, A7.priority_color AS cdata__:priority__priority_color, A7.priority_desc AS cdata__:priority__priority_desc, A1.status_id AS status_id, A8.name AS status__name, A8.state AS status__state, A1.dept_id AS dept_id, B0.name AS dept__name, A5.name AS user__name, A1.lastupdate AS lastupdate, A1.isanswered AS isanswered, B1.firstname AS staff__firstname, B1.lastname AS staff__lastname, B2.name AS team__name, (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_collaborator R0 ON (Q7.id = R0.thread_id) WHERE Q8.ticket_id = A1.ticket_id) AS collab_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 attachment_count, (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 FROM ost_ticket A1 JOIN (SELECT Q7.ticket_id FROM ost_ticket Q7 JOIN ost_ticket_status Q8 ON (Q7.status_id = Q8.id) WHERE Q8.state = 'closed' AND ((Q8.state = 'open' AND Q7.staff_id = 1) OR Q7.dept_id IN ('1', '4')) ORDER BY Q7.ASC LIMIT 5) A2 LEFT JOIN `ost_lock` A3 ON (A1.`lock_id` = A3.`lock_id` AND A3.`expire` > NOW()) LEFT JOIN `ost_ticket__cdata` A4 ON (A1.`ticket_id` = A4.`ticket_id`) JOIN `ost_user` A5 ON (A1.`user_id` = A5.`id`) LEFT JOIN `ost_user_email` A6 ON (A5.`default_email_id` = A6.`id`) LEFT JOIN `ost_ticket_priority` A7 ON (A4.`priority` = A7.`priority_id`) JOIN `ost_ticket_status` A8 ON (A1.`status_id` = A8.`id`) JOIN `ost_department` B0 ON (A1.`dept_id` = B0.`id`) LEFT JOIN `ost_staff` B1 ON (A1.`staff_id` = B1.`staff_id`) LEFT JOIN `ost_team` B2 ON (A1.`team_id` = B2.`team_id`) WHERE A1.`ticket_id` = A2.`ticket_id` GROUP BY A3.`staff_id`, A1.`staff_id`, A1.`isoverdue`, A1.`team_id`, A1.`ticket_id`, A1.`number`, A4.`subject`, A6.`address`, A1.`source`, A7.`priority_color`, A7.`priority_desc`, A1.`status_id`, A8.`name`, A8.`state`, A1.`dept_id`, B0.`name`, A5.`name`, A1.`lastupdate`, A1.`isanswered`, B1.`firstname`, B1.`lastname`, B2.`name` ORDER BY A1. ASC]

Unknown column 'Q7.' in 'order clause'<br /> <br />
---- Backtrace ----<br />
#0 (root)/include/mysqli.php(204): osTicket->logDBError('DB Error #1054', '[SELECT A3.sta...')<br />
#1 (root)/include/class.orm.php(3136): db_query('SELECT A3.
staf...', true, true)<br />
#2 (root)/include/class.orm.php(3183): MySqlExecutor->execute()<br />
#3 (root)/include/class.orm.php(1868): MySqlExecutor->getArray()<br />
#4 (root)/include/class.orm.php(1818): HashArrayIterator->{closure}()<br />
#5 (root)/include/class.orm.php(1797): CallbackSimpleIterator->next()<br />
#6 (root)/include/class.orm.php(1806): CallbackSimpleIterator->rewind()<br />
#7 (root)/include/class.orm.php(1463): CallbackSimpleIterator->valid()<br />
#8 (root)/include/class.orm.php(1480): CachedResultSet->fillTo(9223372036854775807)<br />
#9 (root)/include/class.orm.php(1489): CachedResultSet->asArray()<br />
#10 (root)/include/staff/tickets.inc.php(570): CachedResultSet->getIterator()<br />
#11 (root)/scp/tickets.php(495): require_once('/volume1/web/os...')<br />
#12 (root)/scp/index.php(17): require('/volume1/web/os...')<br />
#13 {main}

Please help us to help you by reading and following the posting guidelines located in this thread: Please read before requesting assistance. The more information you give us the better we will be able to assist you. Thank you.

Environment details?
Version of osTicket?
You will need to remove the "theme" and see if you are still having the same issue. Themes are not actually themes at this time. They are core file mods.

    ntozier Version: 1.10.4 ; enviroment: Synology Server; the error stopped coming up, how can I tell if it was fixed?

      danibaez enviroment: Synology Server;

      This does not tell me if it is Apache, IIS, nginx, or something else and the version.

      danibaez the error stopped coming up, how can I tell if it was fixed?

      Did you do anything to fix it?

        ntozier not sure, on the server I found apache HTTP server installed, version: 2.2

        I did nothing to fix the error.

        Then I would say that problem probably isn't fixed.

          ntozier
          Server Information
          osTicket Version v1.10.4 (035fd0a) — Up to date
          Web Server Software Apache/2.2.34 (Unix) mod_fastcgi/mod_fastcgi-SNAP-0910052141
          MySQL Version 10.3.7
          PHP Version 5.6.39

          Have you removed the "theme" you installed?

            ntozier yes, still nothing happening, the error hasn't come up till that day. Don't know how to know if it was fixed or not.

            If you are not getting the error anymore then then you probably dont have to worry about it.

            Write a Reply...