Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

In this Discussion

osTicket v1.10 (stable) and Maintenance Release v1.9.15 are now available! Go get it now

DB Error #1054

Hello all,

I added a new form to creating a ticket, that would provide the user with a "subtopic" to choose from when submitting an issue. It looks like this broke OSTicket to the point where I cannot even look at existing tickets without getting a DB error. The ticket submits fine, but when viewing the ticket lists I am emailed the following error:


DB Error #1054


[SELECT A5.`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`, A3.`subject` AS
`cdata__subject`, A7.`address` AS `user__default_email__address`, A1.`source`
AS `source`, A4.`priority_color` AS `cdata__:priority__priority_color`,
A4.`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`, A6.`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`) LEFT JOIN
`ost_ticket__cdata` R0 ON (Q7.`ticket_id` = R0.`ticket_id`) LEFT JOIN
`ost_ticket_priority` R1 ON (R0.`priority` = R1.`priority_id`) WHERE
(Q7.`staff_id` = 0 AND Q7.`team_id` = 0) AND Q8.`state` = 'open' AND ((Q8.`state`
= 'open' AND Q7.`staff_id` = 1) OR Q7.`dept_id` IN ('4')) ORDER BY
R1.`priority_urgency` ASC, Q7.`lastupdate` DESC LIMIT 5) A2 LEFT JOIN
`ost_ticket__cdata` A3 ON (A1.`ticket_id` = A3.`ticket_id`) LEFT JOIN
`ost_ticket_priority` A4 ON (A3.`priority` = A4.`priority_id`) LEFT JOIN
`ost_lock` A5 ON (A1.`lock_id` = A5.`lock_id` AND A5.`expire` > NOW()) JOIN
`ost_user` A6 ON (A1.`user_id` = A6.`id`) LEFT JOIN `ost_user_email` A7 ON
(A6.`default_email_id` = A7.`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
A5.`staff_id`, A1.`staff_id`, A1.`isoverdue`, A1.`team_id`, A1.`ticket_id`,
A1.`number`, A3.`subject`, A7.`address`, A1.`source`, A4.`priority_color`,
A4.`priority_desc`, A1.`status_id`, A8.`name`, A8.`state`, A1.`dept_id`,
B0.`name`, A6.`name`, A1.`lastupdate`, A1.`isanswered`, B1.`firstname`,
B1.`lastname`, B2.`name` ORDER BY A4.`priority_urgency` ASC, A1.`lastupdate`


Unknown column 'R0.priority' in 'on clause'<br />
<br />

---- Backtrace ----<br />

#0 C:\xampp\htdocs\tmshelp\include\mysqli.php(204):
osTicket->logDBError('DB Error #1054', '[SELECT A5.`sta...')<br />

#1 C:\xampp\htdocs\tmshelp\include\class.orm.php(3133):
db_query('SELECT A5.`staf...', true, true)<br />

#2 C:\xampp\htdocs\tmshelp\include\class.orm.php(3180):
MySqlExecutor->execute()<br />

#3 C:\xampp\htdocs\tmshelp\include\class.orm.php(1865):
MySqlExecutor->getArray()<br />

#4 C:\xampp\htdocs\tmshelp\include\class.orm.php(1815):
HashArrayIterator->{closure}()<br />

#5 C:\xampp\htdocs\tmshelp\include\class.orm.php(1794):
CallbackSimpleIterator->next()<br />

#6 C:\xampp\htdocs\tmshelp\include\class.orm.php(1803):
CallbackSimpleIterator->rewind()<br />

#7 C:\xampp\htdocs\tmshelp\include\class.orm.php(1463):
CallbackSimpleIterator->valid()<br />

#8 C:\xampp\htdocs\tmshelp\include\class.orm.php(1480):
CachedResultSet->fillTo(2147483647)<br />

#9 C:\xampp\htdocs\tmshelp\include\class.orm.php(1489):
CachedResultSet->asArray()<br />

CachedResultSet->getIterator()<br />

#11 C:\xampp\htdocs\tmshelp\scp\tickets.php(492):
require_once('C:\\xampp\\htdocs...')<br />

#12 {main}


  • two questions:
    - How did you create and add the form?
    - What are the field names and their variables?
Sign In or Register to comment.