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) »
  • Import errors - is it possible to revert to english only DB?
Pages: [1]

Author Topic: Import errors - is it possible to revert to english only DB?  (Read 1752 times)

nihow

  • Guest
Import errors - is it possible to revert to english only DB?
April 28, 2009, 01:48:24 pm
Hi there,

I'm having incredible difficulty trying to move a DB from my production server to my live site. Import fails after the first 13 tables withe the following error:

Code: [Select]
Error
SQL query:

DELIMITER // CREATE TRIGGER `civicrm`.`civicrm_contact_before_insert` BEFORE INSERT ON `civicrm`.`civicrm_contact` FOR EACH ROW BEGIN IF NEW.sort_name_fr_FR IS NOT NULL THEN SET NEW.sort_name_en_US = NEW.sort_name_fr_FR; SET NEW.sort_name_en_AU = NEW.sort_name_fr_FR; ELSEIF NEW.sort_name_en_US IS NOT NULL THEN SET NEW.sort_name_en_AU = NEW.sort_name_en_US; SET NEW.sort_name_fr_FR = NEW.sort_name_en_US; ELSEIF NEW.sort_name_en_AU IS NOT NULL THEN SET NEW.sort_name_en_US = NEW.sort_name_en_AU; SET NEW.sort_name_fr_FR = NEW.sort_name_en_AU; END IF; IF NEW.display_name_fr_FR IS NOT NULL THEN SET NEW.display_name_en_US = NEW.display_name_fr_FR; SET NEW.display_name_en_AU = NEW.display_name_fr_FR; ELSEIF NEW.display_name_en_US IS NOT NULL THEN SET NEW.display_name_en_AU = NEW.display_name_en_US; SET NEW.display_name_fr_FR = NEW.display_name_en_US; ELSEIF NEW.display_name_en_AU IS NOT NULL THEN SET NEW.display_name_en_US = NEW.display_name_en_AU; SET NEW.display_name_fr_FR = NEW.display_nam[...]

MySQL said: Documentation
#1146 - Table 'civicrm.civicrm_contact' doesn't exist

(And yes, the DB user has 'super' privileges). My question is in two parts. (1) the DB name on the prod server is 'civicrm', but it has a different name on the live server. To my untrained eye, it looks as if the old name is being retained in the above example. Is this true, or am I wildly off the mark?
(2) My production install of CiviCRM was set up to be internationalized from day one, so there is no possibility of reverting to an english-only version. But is it possible to remove the tables containing the international data?

Piotr Szotkowski

  • I live on this forum
  • *****
  • Posts: 1497
  • Karma: 57
Re: Import errors - is it possible to revert to english only DB?
May 04, 2009, 03:13:40 am
Quote from: nihow on April 28, 2009, 01:48:24 pm
Code: [Select]
DELIMITER // CREATE TRIGGER `civicrm`.`civicrm_contact_before_insert` BEFORE INSERT ON `civicrm`.`civicrm_contact` […]
#1146 - Table 'civicrm.civicrm_contact' doesn't exist

(And yes, the DB user has 'super' privileges). My question is in two parts. (1) the DB name on the prod server is 'civicrm', but it has a different name on the live server. To my untrained eye, it
looks as if the old name is being retained in the above example. Is this true, or am I wildly off the mark?

Yeah, this looks like the cause of the problem. It looks like your MySQL dump explicitly refers to the civicrm database (while it shouldn’t if the database name is to be changed).

Quote
(2) My production install of CiviCRM was set up to be internationalized from day one, so there is no possibility of reverting to an english-only version. But is it possible to remove the tables containing the international data?

There aren’t any actual tables that contain the localised data, there are just views exposing the localised columns under their original names. I’m working on a script that would turn a localised database into a single-language one, but it’ll take me some time before I’m done.

If you really want to turn your localised database into a single-language one you need to (a) drop all the *_xx_YY views, (b) for every *_xx_YY column rename the chosen language’s column to its original name and drop the rest and (c) set civicrm_domain.locales to NULL.

Note that turning your multilingual site to a single-language one won’t fix the original problem above.
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.

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Discussion »
  • Internationalization and Localization (Moderators: Michał Mach, mathieu) »
  • Import errors - is it possible to revert to english only DB?

This forum was archived on 2017-11-26.