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

Crash when deactivating multilingual

    Details

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

      Description

      If you activate multilingual, don't add a second language, and deactivate it, it gives the following error :

      Base de donnée de code d'erreur: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'END IF; END' at line 1, 1064
      Détails additionnels:

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

      [code] => -2
      [message] => DB Error: syntax error
      [mode] => 16
      [debug_info] => CREATE TRIGGER civicrm_location_type_before_update before update ON civicrm_location_type FOR EACH ROW BEGIN IF NEW.display_name_fr_CA IS NOT NULL THEN END IF; END [nativecode=1064 ** You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'END IF; END' at line 1]
      [type] => DB_Error
      [user_info] => CREATE TRIGGER civicrm_location_type_before_update before update ON civicrm_location_type FOR EACH ROW BEGIN IF NEW.display_name_fr_CA IS NOT NULL THEN END IF; END [nativecode=1064 ** You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'END IF; END' at line 1]
      [to_string] => [db_error: message="DB Error: syntax error" code=-2 mode=callback callback=CRM_Core_Error::handle prefix="" info="CREATE TRIGGER civicrm_location_type_before_update before update ON civicrm_location_type FOR EACH ROW BEGIN IF NEW.display_name_fr_CA IS NOT NULL THEN END IF; END [nativecode=1064 ** You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'END IF; END' at line 1]"]
      )

      Seem to me it shouldn't create triggers when there is only one language. It could cause other problems.
      Not a big problem because it's not used with only one language but can be anoying if doing some tests.
      Maybe we should change the interface so it force you to have at least 2 languages.

        Attachments

          Activity

            People

            • Assignee:
              samuelsov Samuel Vanhove
              Reporter:
              samuelsov Samuel Vanhove
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: