We have recently upgraded to 1.17.2 and since then have been getting some DB Error #1146. I have pasted an extract from the logs below -

The actual full errors are as follows -

NUMBER ONE

[SELECT A1.* FROM osti_note A1 WHERE A1.ext_id = 'U37370' ORDER BY A1.sort ASC, A1.created ASC]

Table 'fireplac_osti1.osti_note' doesn't exist<br />
<br />
---- Backtrace ----<br />
#0 (root)/include/mysqli.php(207): osTicket->logDBError('DB Error #1146', '[SELECT A1.* FR...')<br />
#1 (root)/include/class.orm.php(3482): db_query('SELECT A1.* FRO...', true, true)<br />
#2 (root)/include/class.orm.php(3529): MySqlExecutor->execute()<br />
#3 (root)/include/class.orm.php(2010): MySqlExecutor->getArray()<br />
#4 (root)/include/class.orm.php(2054): ModelInstanceManager->{closure}()<br />
#5 (root)/include/class.orm.php(2033): CallbackSimpleIterator->next()<br />
#6 (root)/include/class.orm.php(2042): CallbackSimpleIterator->rewind()<br />
#7 (root)/include/class.orm.php(1713): CallbackSimpleIterator->valid()<br />
#8 (root)/include/class.orm.php(1723): CachedResultSet->fillTo(9223372036854775807)<br />
#9 (root)/include/class.orm.php(1337): CachedResultSet->asArray()<br />
#10 (root)/include/staff/templates/user.tmpl.php(47): QuerySet->all()<br />
#11 (root)/include/ajax.tickets.php(316): include('/home/fireplac/...')<br />
#12 (root)/include/class.dispatcher.php(153): TicketsAjaxAPI->viewUser('102463')<br />
#13 (root)/include/class.dispatcher.php(40): UrlMatcher->dispatch('102463/user', Array)<br />
#14 (root)/include/class.dispatcher.php(122): Dispatcher->resolve('102463/user', Array)<br />
#15 (root)/include/class.dispatcher.php(40): UrlMatcher->dispatch('/tickets/102463...', NULL)<br />
#16 (root)/scp/ajax.php(326): Dispatcher->resolve('/tickets/102463...')<br />
#17 {main}

NUMBER TWO

[SELECT A1.* FROM osti_note A1 WHERE A1.ext_id = 'U39742' ORDER BY A1.sort ASC, A1.created ASC]

Table 'fireplac_osti1.osti_note' doesn't exist<br />
<br />
---- Backtrace ----<br />
#0 (root)/include/mysqli.php(207): osTicket->logDBError('DB Error #1146', '[SELECT A1.* FR...')<br />
#1 (root)/include/class.orm.php(3482): db_query('SELECT A1.* FRO...', true, true)<br />
#2 (root)/include/class.orm.php(3529): MySqlExecutor->execute()<br />
#3 (root)/include/class.orm.php(2010): MySqlExecutor->getArray()<br />
#4 (root)/include/class.orm.php(2054): ModelInstanceManager->{closure}()<br />
#5 (root)/include/class.orm.php(2033): CallbackSimpleIterator->next()<br />
#6 (root)/include/class.orm.php(2042): CallbackSimpleIterator->rewind()<br />
#7 (root)/include/class.orm.php(1713): CallbackSimpleIterator->valid()<br />
#8 (root)/include/class.orm.php(1723): CachedResultSet->fillTo(9223372036854775807)<br />
#9 (root)/include/class.orm.php(1337): CachedResultSet->asArray()<br />
#10 (root)/include/staff/templates/user.tmpl.php(47): QuerySet->all()<br />
#11 (root)/include/ajax.tickets.php(316): include('/home/fireplac/...')<br />
#12 (root)/include/class.dispatcher.php(153): TicketsAjaxAPI->viewUser('102473')<br />
#13 (root)/include/class.dispatcher.php(40): UrlMatcher->dispatch('102473/user', Array)<br />
#14 (root)/include/class.dispatcher.php(122): Dispatcher->resolve('102473/user', Array)<br />
#15 (root)/include/class.dispatcher.php(40): UrlMatcher->dispatch('/tickets/102473...', NULL)<br />
#16 (root)/scp/ajax.php(326): Dispatcher->resolve('/tickets/102473...')<br />
#17 {main}


I am certainly no expert, but from my little knowledge it looks like the osti_table doesn't exist? Is this something that can be re-created etc? If so, would you be kind enough to provide step by step instructions as I am useless with PHPMyAdmin

Thank you

    Hi KevinTheJedi thank you for taking the time to reply.

    Would this be relevant? If so what exactly do I need to do, to create the table? Thank you

    <tr>
    <td id="L530" class="blob-num js-line-number js-code-nav-line-number js-blob-rnum" data-line-number="530"></td>
    <td id="LC530" class="blob-code blob-code-inner js-file-line"><span class="pl-k">DROP</span> <span class="pl-k">TABLE</span> IF EXISTS <span class="pl-s"><span class="pl-pds"></span>%TABLE_PREFIX%note<span class="pl-pds"></span></span>;</td>
    </tr>
    <tr>
    <td id="L531" class="blob-num js-line-number js-code-nav-line-number js-blob-rnum" data-line-number="531"></td>
    <td id="LC531" class="blob-code blob-code-inner js-file-line">CREATE TABLE <span class="pl-s"><span class="pl-pds"></span>%TABLE_PREFIX%note<span class="pl-pds"></span></span> (</td>
    </tr>
    <tr>

      clarkies

      Please read my post above. You need to copy the create table syntax for the note table and run it in the database to create the missing table.

      Cheers.

      @KevinTheJedi

      I did read the post above. I opened the file you gave and searched for the word "note". This gave me the code below -

      <tr>
      <td id="L530" class="blob-num js-line-number js-code-nav-line-number js-blob-rnum" data-line-number="530"></td>
      <td id="LC530" class="blob-code blob-code-inner js-file-line"><span class="pl-k">DROP</span> <span class="pl-k">TABLE</span> IF EXISTS <span class="pl-s"><span class="pl-pds"></span>%TABLE_PREFIX%note<span class="pl-pds"></span></span>;</td>
      </tr>
      <tr>
      <td id="L531" class="blob-num js-line-number js-code-nav-line-number js-blob-rnum" data-line-number="531"></td>
      <td id="LC531" class="blob-code blob-code-inner js-file-line">CREATE TABLE <span class="pl-s"><span class="pl-pds"></span>%TABLE_PREFIX%note<span class="pl-pds"></span></span> (</td>
      </tr>
      <tr>

      I have no clue where else to look or what else to do, as I am not an expert? Can anyone advise me on a step by step basis of what I need to do please.

      Thank you for your time.

        clarkies

        CREATE TABLE `%TABLE_PREFIX%note` (
          `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
          `pid` int(11) unsigned,
          `staff_id` int(11) unsigned NOT NULL DEFAULT 0,
          `ext_id` varchar(10),
          `body` text,
          `status` int(11) unsigned NOT NULL DEFAULT 0,
          `sort` int(11) unsigned NOT NULL DEFAULT 0,
          `created` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
          `updated` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00' ON UPDATE CURRENT_TIMESTAMP,
          PRIMARY KEY (`id`),
          KEY `ext_id` (`ext_id`)
        ) DEFAULT CHARSET=utf8;

        Thank you so much. I really appreciate your time. Have a great day.

        Write a Reply...