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

osTicket v1.10 DB Error #1054

Hello everyone,

My installation (fresh)

Version osTicket: v1.10 (901e5ea)
Webserver:
Apache/2.4.10 (Debian)
MySQL:
5.5.54
PHP:
5.6.30-0+deb8u1

DB Error #1054

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

---- Recular ----
#0 (raíz)/include/mysqli.php(204): osTicket->logDBError('DB Error #1054', '[SELECT A4.`sta...')
#1 (raíz)/include/class.orm.php(3133): db_query('SELECT A4.`staf...', true, true)
#2 (raíz)/include/class.orm.php(3180): MySqlExecutor->execute()
#3 (raíz)/include/class.orm.php(1865): MySqlExecutor->getArray()
#4 (raíz)/include/class.orm.php(1815): HashArrayIterator->{closure}()
#5 (raíz)/include/class.orm.php(1794): CallbackSimpleIterator->next()
#6 (raíz)/include/class.orm.php(1803): CallbackSimpleIterator->rewind()
#7 (raíz)/include/class.orm.php(1463): CallbackSimpleIterator->valid()
#8 (raíz)/include/class.orm.php(1480): CachedResultSet->fillTo(2147483647)
#9 (raíz)/include/class.orm.php(1489): CachedResultSet->asArray()
#10 (raíz)/include/staff/tickets.inc.php(506): CachedResultSet->getIterator()
#11 (raíz)/scp/tickets.php(492): require_once('/var/www/html/o...')
#12 (raíz)/scp/index.php(17): require('/var/www/html/o...')
#13 {main}


This is the message on /var/log/apache2/error.log

PHP Fatal error:  Uncaught exception 'InconsistentModelException' with message 'Unable to prepare query:  SELECT A4.`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`, A2.`subject` AS `cdata__subject`, A6.`address` AS `user__default_email__address`, A1.`source` AS `source`, A3.`priority_color` AS `cdata__:priority__priority_color`, A3.`priority_desc` AS `cdata__:priority__priority_desc`, A1.`status_id` AS `status_id`, A7.`name` AS `status__name`, A7.`state` AS `status__state`, A1.`dept_id` AS `dept_id`, A8.`name` AS `dept__name`, A5.`name` AS `user__name`, A1.`lastupdate` AS `lastupdate`, A1.`isanswered` AS `isanswered`, B0.`firstname` AS `staff__firstname`, B0.`lastname` AS `staff__lastname`, B1.`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 in /var/www/html/osticket/include/class.orm.php on line 3134, referer: http://server/scp/login.php


Comments

  • I've asked the devs to take a look at this thread.
  • ok, thanks
  • edited May 22
    Any news about this?

    Same error, MySQL
    5.5.52, PHP 5.6.30, osT v1.10 (901e5ea).
  • Version 5.6 is recommended for OSTicket v1.10. Please update your MYSql versions.
  • Does it help to change to 5.6?

    Debian stable version is 5.5.55-0+de

    I'd rather not not use the mysql in stable debian.
  • edited June 6
    When installing, I got this email:

    [CREATE TABLE IF NOT EXISTS `ost_ticket__cdata` (PRIMARY KEY
    (ticket_id)) DEFAULT CHARSET=utf8 AS
    SELECT entry.`object_id` as `ticket_id`, FROM ost_form_entry entry
    JOIN ost_form_entry_values ans ON ans.entry_id = entry.id
    JOIN ost_form_field field ON field.id=ans.field_id
    WHERE entry.object_type='T' GROUP BY entry.object_id]
    Notice the comma before FROM; a syntax error

    I ran this query with the faulty comma removed, and now my ost_ticket__cdata only have the ticket_id column. This naturally causes the Unknown column 'A2.subject' in 'field list' above 

    Deleting the ost_ticket__cdata just recereates the table with the same error: Only one colun.
  • Buenas tardes, se Pudo resolver Este Problema, tengo el mismo inconveniente, gracias por el apoyo
Sign In or Register to comment.