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 - v1.10-rc2

DB Error #1054
[SELECT page.*, count(topic.page_id) as topics FROM ost_content page LEFT JOIN ost_help_topic topic ON(topic.page_id=page.id) WHERE page.content_id=3 GROUP By page.id] Unknown column 'page.content_id' in 'where clause'

I've been getting about 10 of these per day. Any thoughts? The upgrader seemed to finish without any errors.

Comments

  • edited August 2015
    I would post a new issue report for this on github.
    It appears that you do not have a column in your ost_help_topic table.
    https://github.com/osTicket/osTicket-1.8/issues/new

    As a reminder this is a Release Candidate and should not be used in a production enviornment.
  • Very good point. Is there an easy way to downgrade? Probably not I presume since the DB got updated.

  • To downgrade you just need to recover the database and the osTicket directory on your web server from the backup you made before updating to the release candidate.

    But note, that any new tickets, responses, messages, etc. you or any other agent did will then be lost!
  • Just upgraded to latest version 1.10-rc2 and now getting db error ( fortunately have backup). Upgrader completed successfully without errors. Posting the details. 

     DB Error #1054

    [SELECT count(dept_id) FROM ost_department dept WHERE email_id IN (4) OR autoresp_email_id IN (4)] Unknown column 'dept_id' in 'field list'

    ---- Backtrace ----
    #0 C:\wamp\www\osticket\include\mysqli.php(183): osTicket->logDBError('DB Error #1054', '[SELECT count(d...')
    #1 C:\wamp\www\osticket\scp\emails.php(57): db_query('SELECT count(de...')
    #2 {main}

    Checked the logs and it seems as the upgrader started .. other DB errors were there too. 

    DB Error #1146

    [SELECT A1.* FROM `ost_translation` A1 WHERE (A1.`lang` = ? AND A1.`type` = ?)] Table 'ost.ost_translation' doesn't exist

    ---- Backtrace ----
    #0 C:\wamp\www\osticket\include\mysqli.php(318): osTicket->logDBError('DB Error #1146', '[SELECT A1.* FR...')
    #1 C:\wamp\www\osticket\include\class.orm.php(2741): db_prepare('SELECT A1.* FRO...')
    #2 C:\wamp\www\osticket\include\class.orm.php(2735): MySqlExecutor->execute()
    #3 C:\wamp\www\osticket\include\class.orm.php(2811): MySqlExecutor->_prepare()
    #4 C:\wamp\www\osticket\include\class.orm.php(1540): MySqlExecutor->getArray()
    #5 C:\wamp\www\osticket\include\class.orm.php(1363): ModelInstanceManager->fillTo(0)
    #6 C:\wamp\www\osticket\include\class.translation.php(899): ResultSet->valid()
    #7 C:\wamp\www\osticket\include\class.translation.php(920): CustomDataTranslation::getTranslation('en_US')
    #8 C:\wamp\www\osticket\include\class.list.php(392): CustomDataTranslation::translate('7a52eb6cff3a4ce...')
    #9 C:\wamp\www\osticket\include\class.list.php(205): DynamicList->getLocal('name_plural')
    #10 C:\wamp\www\osticket\include\class.list.php(520): DynamicList->getPluralName()
    #11 [internal function]: DynamicList::getSelections()
    #12 C:\wamp\www\osticket\include\class.forms.php(563): call_user_func(Array)
    #13 C:\wamp\www\osticket\include\class.forms.php(571): FormField::allTypes()
    #14 C:\wamp\www\osticket\include\class.forms.php(1002): FormField::getFieldType('text')
    #15 [internal function]: FormField->getImpl(Object(DynamicFormField))
    #16 C:\wamp\www\osticket\include\class.dynamic_forms.php(638): call_user_func_array(Array, Array)
    #17 C:\wamp\www\osticket\include\class.dynamic_forms.php(1385): DynamicFormField->__call('getImpl', Array)
    #18 C:\wamp\www\osticket\include\class.dynamic_forms.php(1385): DynamicFormField->getImpl(Object(DynamicFormField))
    #19 C:\wamp\www\osticket\include\class.dynamic_forms.php(990): DynamicFormEntryAnswer->getField()
    #20 C:\wamp\www\osticket\include\class.company.php(71): DynamicFormEntry->getAnswer('name')
    #21 C:\wamp\www\osticket\include\staff\footer.inc.php(5): Company->__toString()
    #22 C:\wamp\www\osticket\scp\upgrade.php(88): require('C:\wamp\www\ost...')
    #23 C:\wamp\www\osticket\scp\staff.inc.php(116): require('C:\wamp\www\ost...')
    #24 C:\wamp\www\osticket\scp\admin.inc.php(16): require('C:\wamp\www\ost...')
    #25 C:\wamp\www\osticket\scp\upgrade.php(16): require_once('C:\wamp\www\ost...')
    #26 C:\wamp\www\osticket\scp\staff.inc.php(116): require('C:\wamp\www\ost...')
    #27 C:\wamp\www\osticket\scp\autocron.php(18): require('C:\wamp\www\ost...')
    #28 {main}

    -----------------
    DB Error #1146

    [SELECT A1.* FROM `ost_translation` A1 WHERE (A1.`lang` = ? AND A1.`type` = ?)] Table 'ost.ost_translation' doesn't exist

    ---- Backtrace ----
    #0 C:\wamp\www\osticket\include\mysqli.php(318): osTicket->logDBError('DB Error #1146', '[SELECT A1.* FR...')
    #1 C:\wamp\www\osticket\include\class.orm.php(2741): db_prepare('SELECT A1.* FRO...')
    #2 C:\wamp\www\osticket\include\class.orm.php(2735): MySqlExecutor->execute()
    #3 C:\wamp\www\osticket\include\class.orm.php(2811): MySqlExecutor->_prepare()
    #4 C:\wamp\www\osticket\include\class.orm.php(1540): MySqlExecutor->getArray()
    #5 C:\wamp\www\osticket\include\class.orm.php(1363): ModelInstanceManager->fillTo(0)
    #6 C:\wamp\www\osticket\include\class.translation.php(899): ResultSet->valid()
    #7 C:\wamp\www\osticket\include\class.translation.php(920): CustomDataTranslation::getTranslation('en_US')
    #8 C:\wamp\www\osticket\include\class.list.php(392): CustomDataTranslation::translate('7a52eb6cff3a4ce...')
    #9 C:\wamp\www\osticket\include\class.list.php(205): DynamicList->getLocal('name_plural')
    #10 C:\wamp\www\osticket\include\class.list.php(520): DynamicList->getPluralName()
    #11 [internal function]: DynamicList::getSelections()
    #12 C:\wamp\www\osticket\include\class.forms.php(563): call_user_func(Array)
    #13 C:\wamp\www\osticket\include\class.forms.php(571): FormField::allTypes()
    #14 C:\wamp\www\osticket\include\class.forms.php(1002): FormField::getFieldType('text')
    #15 [internal function]: FormField->getImpl(Object(DynamicFormField))
    #16 C:\wamp\www\osticket\include\class.dynamic_forms.php(638): call_user_func_array(Array, Array)
    #17 C:\wamp\www\osticket\include\class.dynamic_forms.php(1385): DynamicFormField->__call('getImpl', Array)
    #18 C:\wamp\www\osticket\include\class.dynamic_forms.php(1385): DynamicFormField->getImpl(Object(DynamicFormField))
    #19 C:\wamp\www\osticket\include\class.dynamic_forms.php(990): DynamicFormEntryAnswer->getField()
    #20 C:\wamp\www\osticket\include\class.company.php(71): DynamicFormEntry->getAnswer('name')
    #21 C:\wamp\www\osticket\include\staff\footer.inc.php(5): Company->__toString()
    #22 C:\wamp\www\osticket\scp\upgrade.php(88): require('C:\wamp\www\ost...')
    #23 {main}

    ---------------------------



  • @onlinetechguy
    neither of those errors are the same as the one reported in this thread.  Please start your own thread if you are experiencing difficulties.
  • ok thanks ntozier. 
  • hi,

    just performed a osticket upgrade  1.9.2 To 1.9.12 whitout trouble, but now i get the following issue  "DB Error 1054 - 1.9.12 ".

    DB Error #1054

    [SELECT ticket_id FROM ost_ticket T1 LEFT JOIN ost_sla T2 ON (T1.sla_id=T2.id AND T2.isactive=1) WHERE status='open' AND isoverdue=0 AND ((reopened is NULL AND duedate is NULL AND TIME_TO_SEC(TIMEDIFF(NOW(), T1.created))>=T2.grace_period*3600) OR (reopened is NOT NULL AND duedate is NULL AND TIME_TO_SEC(TIMEDIFF(NOW(), reopened))>=T2.grace_period*3600) OR (duedate is NOT NULL AND duedate
    ---- Backtrace ----
    #0 (root)/include/mysqli.php(177): osTicket->logDBError('DB Error #1054', '[SELECT ticket_...')
    #1 (root)/include/class.ticket.php(2723): db_query('SELECT ticket_i...')
    #2 (root)/include/class.cron.php(31): Ticket::checkOverdue()
    #3 (root)/scp/autocron.php(57): Cron::TicketMonitor()
    #4 {main}


    Thank's for your feedback

    XC

Sign In or Register to comment.