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) »
  • CRM-7887 can apply patch or need to upgrade?
Pages: [1]

Author Topic: CRM-7887 can apply patch or need to upgrade?  (Read 1083 times)

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
CRM-7887 can apply patch or need to upgrade?
April 27, 2011, 06:36:28 am
https://fisheye2.atlassian.com/changelog/CiviCRM?cs=33883 it looks like Piotr's patch "3.4 no longer has multilingual civicrm_contact columns, so the name triggers are not necessary" means that we'll need to upgrade to 3.4 to fix this - i.e. we can't easily patch a 3.3.

would be great if we could confirm this.

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

Piotr Szotkowski

  • I live on this forum
  • *****
  • Posts: 1497
  • Karma: 57
Re: CRM-7887 can apply patch or need to upgrade?
May 10, 2011, 06:32:54 am
For 3.3 and CRM-7887 you need to hack the SQL for the triggers to fix this.

I think it should be enough to just move the prefix/suffix code form $namesTrigger to $individualNamesTrigger, something to the point of adding

Code: [Select]
$individualNamesTrigger[] = "SET @prefix := NULL;";
$individualNamesTrigger[] = "SET @suffix := NULL;";
$individualNamesTrigger[] = "IF NEW.prefix_id IS NOT NULL THEN SELECT v.label_{$loc} 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; END IF;";
$individualNamesTrigger[] = "IF NEW.suffix_id IS NOT NULL THEN SELECT v.label_{$loc} INTO @suffix FROM civicrm_option_value v JOIN civicrm_option_group g ON (v.option_group_id = g.id) WHERE g.name = 'individual_suffix' AND v.value = NEW.suffix_id; END IF;";

right after the $individualNamesTrigger[] = "IF NEW.contact_type = 'Individual' THEN"; line.
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) »
  • CRM-7887 can apply patch or need to upgrade?

This forum was archived on 2017-11-26.