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) »
  • Old sections (read-only, deprecated) »
  • Developer Discussion (Moderator: Donald Lobo) »
  • Logging in a multilingual install
Pages: [1]

Author Topic: Logging in a multilingual install  (Read 687 times)

bpmccain

  • I post frequently
  • ***
  • Posts: 255
  • Karma: 5
  • CiviCRM version: 4.1
  • CMS version: Drupal 7.12
  • MySQL version: 5.2
  • PHP version: 5.2
Logging in a multilingual install
November 08, 2012, 12:55:58 pm
I'm playing around with trying to enable logging in a multilingual install and make sure all of the triggers play nicely together. It all works until I get to the following trigger setup:

CREATE TRIGGER civicrm_events_in_carts_after_insert after insert ON civicrm_events_in_carts FOR EACH ROW BEGIN IF ( @civicrm_disable_logging IS NULL OR @civicrm_disable_logging = 0 ) THEN INSERT INTO `civinbla_logs`.log_civicrm_events_in_carts (log_conn_id, log_user_id, log_action) VALUES ( CONNECTION_ID(), @civicrm_user_id, 'insert');END IF; END

at which point I get the following backtrace:
Code: [Select]
backTrace

#0 /persistent/html/sites/all/modules/civicrm/CRM/Core/Error.php(148): CRM_Core_Error::backtrace()
#1 [internal function](): CRM_Core_Error::handle(Object(DB_Error))
#2 /persistent/html/sites/all/modules/civicrm/packages/PEAR.php(931): call_user_func((Array:2), Object(DB_Error))
#3 /persistent/html/sites/all/modules/civicrm/packages/DB.php(968): PEAR_Error->PEAR_Error("DB Error: unknown error", -1, 16, (Array:2), "CREATE TRIGGER civicrm_events_in_carts_after_insert after insert ON civicrm_e...")
#4 /persistent/html/sites/all/modules/civicrm/packages/PEAR.php(564): DB_Error->DB_Error(-1, 16, (Array:2), "CREATE TRIGGER civicrm_events_in_carts_after_insert after insert ON civicrm_e...")
#5 /persistent/html/sites/all/modules/civicrm/packages/DB/common.php(1903): PEAR->raiseError(NULL, -1, NULL, NULL, "CREATE TRIGGER civicrm_events_in_carts_after_insert after insert ON civicrm_e...", "DB_Error", TRUE)
#6 /persistent/html/sites/all/modules/civicrm/packages/DB/mysql.php(898): DB_common->raiseError(-1, NULL, NULL, NULL, "1235 ** This version of MySQL doesn't yet support 'multiple triggers with the...")
#7 /persistent/html/sites/all/modules/civicrm/packages/DB/mysql.php(327): DB_mysql->mysqlRaiseError()
#8 /persistent/html/sites/all/modules/civicrm/packages/DB/common.php(1216): DB_mysql->simpleQuery("CREATE TRIGGER civicrm_events_in_carts_after_insert after insert ON civicrm_e...")
#9 /persistent/html/sites/all/modules/civicrm/packages/DB/DataObject.php(2421): DB_common->query("CREATE TRIGGER civicrm_events_in_carts_after_insert after insert ON civicrm_e...")
#10 /persistent/html/sites/all/modules/civicrm/packages/DB/DataObject.php(1613): DB_DataObject->_query("CREATE TRIGGER civicrm_events_in_carts_after_insert after insert ON civicrm_e...")
#11 /persistent/html/sites/all/modules/civicrm/CRM/Core/DAO.php(155): DB_DataObject->query("CREATE TRIGGER civicrm_events_in_carts_after_insert after insert ON civicrm_e...")
#12 /persistent/html/sites/all/modules/civicrm/CRM/Core/DAO.php(922): CRM_Core_DAO->query("CREATE TRIGGER civicrm_events_in_carts_after_insert after insert ON civicrm_e...", FALSE)
#13 /persistent/html/sites/all/modules/civicrm/CRM/Core/DAO.php(1637): CRM_Core_DAO::executeQuery("CREATE TRIGGER civicrm_events_in_carts_after_insert after insert ON civicrm_e...", (Array:0), TRUE, NULL, FALSE, FALSE)
#14 /persistent/html/sites/all/modules/civicrm/CRM/Core/DAO.php(1538): CRM_Core_DAO::createTriggers((Array:476))
#15 /persistent/html/sites/all/modules/civicrm/CRM/Logging/Schema.php(143): CRM_Core_DAO::triggerRebuild()
#16 /persistent/html/sites/all/modules/civicrm/CRM/Admin/Form/Setting/Miscellaneous.php(129): CRM_Logging_Schema->enableLogging()
#17 /persistent/html/sites/all/modules/civicrm/CRM/Core/Form.php(246): CRM_Admin_Form_Setting_Miscellaneous->postProcess()
#18 /persistent/html/sites/all/modules/civicrm/CRM/Core/StateMachine.php(159): CRM_Core_Form->mainProcess()
#19 /persistent/html/sites/all/modules/civicrm/CRM/Core/QuickForm/Action/Next.php(60): CRM_Core_StateMachine->perform(Object(CRM_Admin_Form_Setting_Miscellaneous), "next", "Next")
#20 /persistent/html/sites/all/modules/civicrm/packages/HTML/QuickForm/Controller.php(203): CRM_Core_QuickForm_Action_Next->perform(Object(CRM_Admin_Form_Setting_Miscellaneous), "next")
#21 /persistent/html/sites/all/modules/civicrm/packages/HTML/QuickForm/Page.php(103): HTML_QuickForm_Controller->handle(Object(CRM_Admin_Form_Setting_Miscellaneous), "next")
#22 /persistent/html/sites/all/modules/civicrm/CRM/Core/Controller.php(289): HTML_QuickForm_Page->handle("next")
#23 /persistent/html/sites/all/modules/civicrm/CRM/Utils/Wrapper.php(115): CRM_Core_Controller->run()
#24 /persistent/html/sites/all/modules/civicrm/CRM/Core/Invoke.php(192): CRM_Utils_Wrapper->run("CRM_Admin_Form_Setting_Miscellaneous", "Undelete, Logging and ReCAPTCHA", NULL)
#25 /persistent/html/sites/all/modules/civicrm/drupal/civicrm.module(500): CRM_Core_Invoke::invoke((Array:4))
#26 [internal function](): civicrm_invoke("admin", "setting", "misc")
#27 /persistent/html/includes/menu.inc(517): call_user_func_array("civicrm_invoke", (Array:3))
#28 /persistent/html/index.php(21): menu_execute_active_handler()
#29 {main}

I can't make sense of it. If I try to add the trigger manually, I get:
Code: [Select]
#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 ''
The backtrace would indicate the error is due to 'multiple triggers with the same action time and event for one table'. But as far as I can see, there are no triggers setup for this action time, event and table. ( after insert ON civicrm_events_in_carts ).

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Developer Discussion (Moderator: Donald Lobo) »
  • Logging in a multilingual install

This forum was archived on 2017-11-26.