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) »
  • Support »
  • Using CiviCRM »
  • Using Core CiviCRM Functions (Moderator: Yashodha Chaku) »
  • Custom triggers gets deleted automatically
Pages: [1]

Author Topic: Custom triggers gets deleted automatically  (Read 318 times)

tapash

  • I post occasionally
  • **
  • Posts: 56
  • Karma: 0
  • CiviCRM version: 4.4.13
  • CMS version: Drupal 7.34
  • MySQL version: 5.1
  • PHP version: 5.3.3
Custom triggers gets deleted automatically
March 15, 2014, 06:33:12 am
I have created a custom triggers in MySQL database to filled in the source field when making an offline contribution. Trigger works for a day and then automatically gets deleted and I could not find any log for deletation. Civicrm has root access to MySQL. Does anyone know what could cause this?

Edit: the default triggers for civicrm is still there though. My custom created ones are gone.
« Last Edit: March 15, 2014, 07:02:55 am by tapash »

CiviTeacher.com

  • I live on this forum
  • *****
  • Posts: 1282
  • Karma: 118
    • CiviTeacher
  • CiviCRM version: 3.4 - 4.5
  • CMS version: Drupal 6&7, Wordpress
  • MySQL version: 5.1 - 5.5
  • PHP version: 5.2 - 5.4
Re: Custom triggers gets deleted automatically
March 16, 2014, 07:31:05 pm
Wouldn't this be better done programmatically via a PHP Drupal module, custom PHP file or CiviCRM extension?  Making manual edits to the CiviCRM MySQL schema is not a best practice.
Try CiviTeacher: the online video tutorial CiviCRM learning library.

tapash

  • I post occasionally
  • **
  • Posts: 56
  • Karma: 0
  • CiviCRM version: 4.4.13
  • CMS version: Drupal 7.34
  • MySQL version: 5.1
  • PHP version: 5.3.3
Re: Custom triggers gets deleted automatically
March 17, 2014, 12:33:22 am
Ita good idea, but i dont have any programming knowledge..... Thats the problem...

Eileen

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4195
  • Karma: 218
    • Fuzion
Re: Custom triggers gets deleted automatically
March 17, 2014, 12:38:38 am
Here is an example of using the trigger hook to define triggers such that they don't get destroyed (& get merged with any other triggers that are defined)

https://github.com/eileenmcnaughton/nz.co.fuzion.regionfields/blob/master/regionfields.php#L72
Make today the day you step up to support CiviCRM and all the amazing organisations that are using it to improve our world - http://civicrm.org/contribute

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using Core CiviCRM Functions (Moderator: Yashodha Chaku) »
  • Custom triggers gets deleted automatically

This forum was archived on 2017-11-26.