Uploaded image for project: 'CiviCRM'
  1. CiviCRM
  2. CRM-10597

4.2 beta3 upgrade & multi-lingual: problem with triggers and option group labels

    Details

    • Type: Bug
    • Status: Done/Fixed
    • Priority: Major
    • Resolution: Fixed/Completed
    • Affects Version/s: 4.2.0
    • Fix Version/s: 4.2.0
    • Component/s: None
    • Labels:
      None

      Description

      While upgrading a multi-lingual site from 4.0 to 4.2, I had the following error:

      WD civicrm: $Fatal Error Details =
      [...]
      [code] => -19
      [message] => DB Error: no such field
      [mode] => 16
      [debug_info] => CREATE TRIGGER civicrm_option_group_before_update before update ON civicrm_option_group FOR EACH ROW BEGIN IF NEW.label_en_US IS NOT NULL THEN IF NEW.label_fr_FR
      IS NULL THEN SET NEW.label_fr_FR = NEW.label_en_US; END IF; ELSEIF NEW.label_fr_FR IS NOT NULL THEN IF NEW.label_en_US IS NULL THEN SET NEW.label_en_US = NEW.label_fr_FR; END IF; END
      IF; IF NEW.description_en_US IS NOT NULL THEN IF NEW.description_fr_FR IS NULL THEN SET NEW.description_fr_FR = NEW.description_en_US; END IF; ELSEIF NEW.description_fr_FR IS NOT NULL
      THEN IF NEW.description_en_US IS NULL THEN SET NEW.description_en_US = NEW.description_fr_FR; END IF; END IF; END [nativecode=1054 ** Unknown column 'label_en_US' in 'NEW']
      [...]

      So far, I have isolated it to the fact that CRM/Upgrade/Incremental/php/FourTwo.php calls CRM_Core_DAO::triggerRebuild(), and also that the 4.1 renames "civicrm_option_group.label" to "title".

      In my database, after the error, my civicrm_option_group table has indeed renamed "label" to "title", but I wonder why triggerRebuild() is using an old schema.

        Attachments

          Activity

            People

            • Assignee:
              mlutfy Mathieu Lutfy
              Reporter:
              mlutfy Mathieu Lutfy
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: