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) »
  • Discussion »
  • Internationalization and Localization (Moderators: Michał Mach, mathieu) »
  • After moving civicrm to new server, SQL-requests for non-existent *_en_US tables
Pages: [1]

Author Topic: After moving civicrm to new server, SQL-requests for non-existent *_en_US tables  (Read 4270 times)

hanschri

  • Guest
After moving civicrm to new server, SQL-requests for non-existent *_en_US tables
November 23, 2009, 01:07:03 am
Ok, so I'm not great at this SQL stuff. I took in some external "help" who moved my Drupal/civiCRM (2.2) install to a new server. Since then, I can no longer see the civiCRM language switch block, and it has stopped working completely by throwing "DB Error: no such table" on every page. I have (had?) a multilingual install with Swedish and Spanish enabled. The _sv_se and _es_es tables are all there, but it seems as if my install has forgotten what languages are installed? Can I set the value of $locale or $dbLocale or whatever manually somewhere?
Help!

Piotr Szotkowski

  • I live on this forum
  • *****
  • Posts: 1497
  • Karma: 57
Re: After moving civicrm to new server, SQL-requests for non-existent *_en_US tables
November 23, 2009, 01:45:57 am
First, you need to check yout civicrm_domain table to see whether the locales column holds the right locales.

Second, can you post an example ‘no such table’ error?
If you found the above helpful, please consider helping us in return – you can even steer CiviCRM’s future and help us extend CiviCRM in ways useful to you.

hanschri

  • Guest
Re: After moving civicrm to new server, SQL-requests for non-existent *_en_US tables
November 23, 2009, 07:22:05 am
The civicrm_domain table holds (seen through phpmyadmin) "sv_SEes_ES". Where does it get the en_US from? Can I make it default to sv_SE? I also notice that my tables are called *_sv_se in lower-case, does that matter?

Here's the error from the administer civicrm-page:

    Sorry. A non-recoverable error has occurred.

    DB Error: no such table

    Database Error Code: Table 'civicrm.civicrm_contribution_page_en_US' doesn't exist, 1146

    Return to home page.

Error Details:

Array
(
    [callback] => Array
        (
           
  • => CRM_Core_Error
  • [1] => handle
            )

       
Code: [Select]
=> -18
    [message] => DB Error: no such table
    [mode] => 16
    [debug_info] => SELECT count(civicrm_contribution_page_en_US.id) as DATAOBJECT_NUM
                FROM civicrm_contribution_page_en_US   WHERE ( is_active = 1 )  [nativecode=1146 ** Table 'civicrm.civicrm_contribution_page_en_US' doesn't exist]
    [type] => DB_Error
    [user_info] => SELECT count(civicrm_contribution_page_en_US.id) as DATAOBJECT_NUM
                FROM civicrm_contribution_page_en_US   WHERE ( is_active = 1 )  [nativecode=1146 ** Table 'civicrm.civicrm_contribution_page_en_US' doesn't exist]
    [to_string] => [db_error: message="DB Error: no such table" code=-18 mode=callback callback=CRM_Core_Error::handle prefix="" info="SELECT count(civicrm_contribution_page_en_US.id) as DATAOBJECT_NUM
                FROM civicrm_contribution_page_en_US   WHERE ( is_active = 1 )  [nativecode=1146 ** Table 'civicrm.civicrm_contribution_page_en_US' doesn't exist]"]
)

Piotr Szotkowski

  • I live on this forum
  • *****
  • Posts: 1497
  • Karma: 57
Re: After moving civicrm to new server, SQL-requests for non-existent *_en_US tables
November 24, 2009, 02:08:10 am
Quote from: hanschri on November 23, 2009, 07:22:05 am
The civicrm_domain table holds (seen through phpmyadmin) "sv_SEes_ES". Where does it get the en_US from?

Hm, good question – I’m pretty sure we try our best to limit the possible values of $dbLocale to these found in civicrm_domain.locales.

Quote
Can I make it default to sv_SE?

Can you try accessing your install with a …&lcMessages=sv_SE appended at the end of the URL (of any CiviCRM page)?

Quote
I also notice that my tables are called *_sv_se in lower-case, does that matter?

Yes, it very well might; the tables should be called …_sv_SE – and my quick tests MySQL is case-sensitive when it comes to table names. Please try migrating the database with the table (technically – view) names properly cased (…xx_YY).
If you found the above helpful, please consider helping us in return – you can even steer CiviCRM’s future and help us extend CiviCRM in ways useful to you.

FatherShawn

  • Ask me questions
  • ****
  • Posts: 372
  • Karma: 25
    • C3 Design
  • CiviCRM version: 4.2.11
  • CMS version: Drupal 7.23
  • MySQL version: 5.5.32
  • PHP version: 5.3.10
Re: After moving civicrm to new server, SQL-requests for non-existent *_en_US tables
December 14, 2011, 05:50:42 pm
Leaving a note here in case someone else is searching for this error.  The error the original poster cites indicates that the export is from an installation that is not case-sensitive which has been imported into an installation that is case sensitive.  To fix this, clear out the imported database. Open then sql dump file and globally find and replace the language codes, such as:
Find en_us and replace with en_US
All the pairs should be xx_XX.

Save and re-import.
Lead Developer, C3 Design.
Twitter: @FatherShawn

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Discussion »
  • Internationalization and Localization (Moderators: Michał Mach, mathieu) »
  • After moving civicrm to new server, SQL-requests for non-existent *_en_US tables

This forum was archived on 2017-11-26.