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) »
  • Language issues with 3.3.6
Pages: [1]

Author Topic: Language issues with 3.3.6  (Read 1590 times)

phunter

  • I’m new here
  • *
  • Posts: 29
  • Karma: 0
  • CiviCRM version: Latest
  • CMS version: Drupal 7
Language issues with 3.3.6
April 07, 2011, 09:22:31 am
We are using a multi-language installation with
English, French, Italian, Russian, Spanish all active is a simple installation of CiviCRM. The system is set up of an international event. Only one event exists in this database with about 10 custom data fields for event questions with tick box or selectable answers.
After upgrading to 3.3.6 we have found that when contact records are created or edited (with the language set as English) then the title in the display name is changed to the Russian value i.e. Miss becomes Госпожица.
We have created a list of titles and included all the translations for each language. Russian is the 4th language in the list when adding the different language values.
Looking at the contact table in the database I see that the display_name_##_## displays the title in Russian. The ##_## reflect that this error affects all the country code tables not just the en_GB column.

Any ideas?


This error has resulted in the need to update the database table values themselves but would like to make sure the code is corrected before we execute this update on the display name in the contact table
« Last Edit: April 07, 2011, 09:53:19 am by phunter »

phunter

  • I’m new here
  • *
  • Posts: 29
  • Karma: 0
  • CiviCRM version: Latest
  • CMS version: Drupal 7
Re: Language issues with 3.3.6 - DB limit on Mailing view
April 07, 2011, 09:49:33 am
Another error occurred on the update with regards to sending out an email template. The same process was followed and the same email was sent prior to the update and another sent after the update but this one failed to get passed the >>3. Mailing Content Section. When clicking Next>> on this page the attached error was displayed (the error message is simplified but include details of the length of the message.
On investigation I removed the plain text part of the mailing content (to reduce size) and the mailing was successfully sent. It seems like more information is now being passed to the civicrm_mailing_en_GB database view pushing the table size over the physical limit of mysql.

The email is a large email body so must have been on the limit in CiviCRM 3.3.2 but 3.3.6 this is reduced further.

Any thoughts as to what has changed to cause this error.

Thanks

Michael McAndrew

  • Forum Godess / God
  • I live on this forum
  • *****
  • Posts: 1274
  • Karma: 55
    • Third Sector Design
  • CiviCRM version: various
  • CMS version: Nearly always Drupal
  • MySQL version: 5.5
  • PHP version: 5.3
Re: Language issues with 3.3.6
April 08, 2011, 06:47:05 am
So the reason it is getting set as russian is that Russian is the last language in the 'multilingual trigger magic loop', presumably because russian is the last language alphabetically.

We looked at the civicrm_contact_before_update triggers.  They are pasted here: http://paste2.org/p/1351506

On line 495 ( I broke each line on a ; ) it correctly finds and sets the gb prefix.

Code: [Select]
IF NEW.prefix_id IS NOT NULL THEN
SELECT v.label_en_GB INTO @prefix
FROM civicrm_option_value v JOIN civicrm_option_group g ON (v.option_group_id = g.id)
WHERE g.name = 'individual_prefix' AND v.value = NEW.prefix_id;

Presumably display_name_en_GB should then be set, but instead, it cycles through all the other languages, ending with ru_RU.

Then, starting at line 555, it cycles through languages again and sets display names based on the last value of @prefix, which in this case uses the Russian prefix for all contacts.
« Last Edit: April 08, 2011, 06:49:25 am by michaelmcandrew »
Service providers: Grow your business, build your reputation and support CiviCRM. Become a partner today

Michael McAndrew

  • Forum Godess / God
  • I live on this forum
  • *****
  • Posts: 1274
  • Karma: 55
    • Third Sector Design
  • CiviCRM version: various
  • CMS version: Nearly always Drupal
  • MySQL version: 5.5
  • PHP version: 5.3
Re: Language issues with 3.3.6
April 08, 2011, 07:08:30 am
Looking in CRM/Core/I18n/Schema.php I see that rebuildMultilingualSchema calls createTriggerQueries which drops and recreates the trigger queries.

I presume it is a reasonably simple rewrite to the code around lines 378-99.

I'll work on that with Piotr.

The other question is that it looks (from a cursory glance) like this is only called on an upgrade.  I presume it (or something similar is also called when you initially turn on multilingual?  How can we correct this before the upgrade.  i.e.  what is the best way to call rebuildMultilingualSchema?

Service providers: Grow your business, build your reputation and support CiviCRM. Become a partner today

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Discussion »
  • Internationalization and Localization (Moderators: Michał Mach, mathieu) »
  • Language issues with 3.3.6

This forum was archived on 2017-11-26.