CiviCRM Community Forums (archive)

*

News:

Have a question about CiviCRM?
Get it answered quickly at the new
CiviCRM Stack Exchange Q+A site

This forum was archived on 25 November 2017. Learn more.
How to get involved.
What to do if you think you've found a bug.



  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Upgrading CiviCRM (Moderator: Deepak Srivastava) »
  • Base table or view not found: 1146 Table 'fgoffices.system' doesn't exist
Pages: [1]

Author Topic: Base table or view not found: 1146 Table 'fgoffices.system' doesn't exist  (Read 6019 times)

firstglance

  • I’m new here
  • *
  • Posts: 9
  • Karma: 1
  • CiviCRM version: 4.2
  • CMS version: Drupal 7.15
  • MySQL version: 5.x
  • PHP version: 5.x
Base table or view not found: 1146 Table 'fgoffices.system' doesn't exist
August 24, 2012, 04:28:03 am
Upgrade was going great till the step where it was supposed to rebuild the menus.  Then I got the following error:

PDOException: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'fgoffices.system' doesn't exist: SELECT name, status FROM system WHERE type = 'module' AND schema_version <> -1; Array ( ) in CRM_Utils_System_Drupal->getModules() (line 868 of /home/fgoffices/fgoffices.org/drupal-7.14/sites/all/modules/civicrm/CRM/Utils/System/Drupal.php).

The table name should have the drupal_ prefix.  How do I correct this?

firstglance

  • I’m new here
  • *
  • Posts: 9
  • Karma: 1
  • CiviCRM version: 4.2
  • CMS version: Drupal 7.15
  • MySQL version: 5.x
  • PHP version: 5.x
Re: Base table or view not found: 1146 Table 'fgoffices.system' doesn't exist
August 24, 2012, 04:31:30 am
Fixed it by changing line 868 in file mentioned above to include the prefix.

    $q = db_query('SELECT name, status FROM system WHERE type = \'module\' AND schema_version <> -1');

to:

    $q = db_query('SELECT name, status FROM drupal_system WHERE type = \'module\' AND schema_version <> -1');

I assume this is a bug in the install that should be fixed where it identifies the prefix to use.

cognoscento

  • I post occasionally
  • **
  • Posts: 44
  • Karma: 1
  • CiviCRM version: 4.2
  • CMS version: Drupal 7.17
  • MySQL version: 5.1.65
  • PHP version: 5.3.17
Re: Base table or view not found: 1146 Table 'fgoffices.system' doesn't exist
August 29, 2012, 12:01:57 pm
I've had exactly the same problem.

Code: [Select]
PDOException: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'interpca_drupalc2.system' doesn't exist: SELECT name, status FROM system WHERE type = 'module' AND schema_version <> -1; Array ( ) in CRM_Utils_System_Drupal->getModules() (line 868 of /home/interpca/public_html/sites/all/modules/civicrm/CRM/Utils/System/Drupal.php).
I'd prefer not to edit files, but if that's the only solution I guess I'll do it. Maybe someone involved with the dev team might chime in on this?

TheoRichel

  • I post frequently
  • ***
  • Posts: 122
  • Karma: 0
  • CiviCRM version: 4.2.1
  • CMS version: Drupal 6.24
  • MySQL version: 5.9
  • PHP version: 5.3.16
Re: Base table or view not found: 1146 Table 'fgoffices.system' doesn't exist
September 03, 2012, 08:24:41 am
I am having a similar/identical problem after upgrading to Civicrm 4.2 on D6. This is my message

Quote
user warning: Table 'theorichel_grk.system' doesn't exist query: SELECT name, status FROM system WHERE type = 'module' AND schema_version <> -1 in /home/theorichel/domains/grkmain.com/public_html/sites/all/modules/civicrm/CRM/Utils/System/Drupal6.php on line 798.

I wouldnt know how to alter that line.

Thx

TR

planetwebb

  • I post occasionally
  • **
  • Posts: 62
  • Karma: 2
  • CiviCRM version: 4.5.8
  • CMS version: Joomla 2.5.28 / Drupal 7.34
  • MySQL version: 5.5.34-cll-lve
  • PHP version: 5.3.22
Re: Base table or view not found: 1146 Table 'fgoffices.system' doesn't exist
September 03, 2012, 08:40:44 am
As a reference, I was seeing a similar error message on a fresh Drupal install (separate databases).  After playing around, I reinstalled Drupal without a prefix and so far, no error messages...

Keith

TheoRichel

  • I post frequently
  • ***
  • Posts: 122
  • Karma: 0
  • CiviCRM version: 4.2.1
  • CMS version: Drupal 6.24
  • MySQL version: 5.9
  • PHP version: 5.3.16
Re: Base table or view not found: 1146 Table 'fgoffices.system' doesn't exist
September 03, 2012, 10:30:37 am
OOops. It was right before my eyes. Sorry. I have a vision problem (http://www.richel.org/nefritis_eng ).

TheoRichel

  • I post frequently
  • ***
  • Posts: 122
  • Karma: 0
  • CiviCRM version: 4.2.1
  • CMS version: Drupal 6.24
  • MySQL version: 5.9
  • PHP version: 5.3.16
Re: Base table or view not found: 1146 Table 'fgoffices.system' doesn't exist
September 03, 2012, 12:48:09 pm
But I fail nevertheless. When I replace 'system' in that query with and underscore 'drupal_system' the error message stays there, but when I replace it with a dot it can apparently find it, but then I get a denial message:

user warning: SELECT command denied to user 'theorichel_tri'@'localhost' for table 'system' query: SELECT name, status FROM drupal.system WHERE type = 'module' AND schema_version <> -1 in /home/theorichel/domains/grkmain.com/public_html/sites/all/modules/civicrm/CRM/Utils/System/Drupal6.php on line 798.

What to do now?

Kurund Jalmi

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4169
  • Karma: 128
    • CiviCRM
  • CiviCRM version: 4.x, future
  • CMS version: Drupal 7, Joomla 3.x
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: Base table or view not found: 1146 Table 'fgoffices.system' doesn't exist
September 03, 2012, 02:03:42 pm
This was a bug and fix will be available in next release. You can get the patch from https://fisheye2.atlassian.com/changelog/CiviCRM?cs=42140

Hth
Kurund
Found this reply helpful? Support CiviCRM

TheoRichel

  • I post frequently
  • ***
  • Posts: 122
  • Karma: 0
  • CiviCRM version: 4.2.1
  • CMS version: Drupal 6.24
  • MySQL version: 5.9
  • PHP version: 5.3.16
Re: Base table or view not found: 1146 Table 'fgoffices.system' doesn't exist
September 04, 2012, 12:53:40 am
That did it, many thanks!

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Upgrading CiviCRM (Moderator: Deepak Srivastava) »
  • Base table or view not found: 1146 Table 'fgoffices.system' doesn't exist

This forum was archived on 2017-11-26.