Details
-
Type: Improvement
-
Status: Done/Fixed
-
Priority: Minor
-
Resolution: Fixed/Completed
-
Affects Version/s: 4.3.3
-
Fix Version/s: 4.7
-
Component/s: Core CiviCRM, Internationalisation
-
Labels:
-
Documentation Required?:None
-
Funding Source:Contributed Code
Description
Detailed logging has not previously been possible on multilingual installations due to conflicts in triggers. These small changes appear to get logging working on our multilingual installtion (english and french). Some work is going to need to be done to make these changes more general, as it is quite specific at the moment.
Changes to four files necessary:
CRM/Admin/Form/Setting/Miscellaneous.php: Need to allow logging to be enabled for a multilingual install
CRM/Core/DAO.php: When logging triggers are applied to their respective tables, a syntax error occurs and halts the process on civicrm_events_in_carts table
CRM/Logging/Schema.php: When logging is toggled, all triggers are dropped and rebuilt. However, due to multilingual being enabled, the triggers on civicrm_events_in_carts do not drop. An error occurs when enabling logging, if triggers are present already on this table. Also, we need to make sure that logging tables have the multilingual columns
packages/DB/DataObject.php: Multilingual creates views of several tables. Enabling logging creates log tables named after the view instead of the table. An error would occur when the logging trigger attempts to write to a non-existent table.
Then you can go into the admin menu and enable logging. This has only been tested on a bilingual installed (en_CA and fr_CA) with logging done to a seperate database as defined in civicrm.settings.php as opposed to tables in the main civi db.
Credit should go to Alex Reddon, our co-op student from UNB for getting this far.
Would be great to generalize these changes and get this committed to Core. Haven't had any issues yet. I've disabled and re-enabled multiple times.