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) »
  • Triggers with no Logging
Pages: [1]

Author Topic: Triggers with no Logging  (Read 948 times)

Hershel

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4640
  • Karma: 176
    • CiviHosting
  • CiviCRM version: Latest
  • CMS version: Mostly WordPress and Drupal
Triggers with no Logging
February 08, 2011, 06:17:38 am
On a Drupal site with CiviCRM 3.3.2, when I delete a custom field I get an error like:

Code: [Select]
    [message] => DB Error: insufficient permissions
    [mode] => 16
    [debug_info] => CREATE TRIGGER civicrm_value_hershel_test_24_after_insert AFTER Insert ON civicrm_value_hershel_test_24 FOR EACH ROW INSERT INTO `civicrm`.log_civicrm_value_hershel_test_24 (id, entity_id, log_conn_id, log_user_id, log_action) VALUES (NEW.id, NEW.entity_id, CONNECTION_ID(), @civicrm_user_id, 'Insert') [nativecode=1142 ** TRIGGER command denied to user 'hershel'@'localhost' for table 'civicrm_value_hershel_test_24']
    [type] => DB_Error

This site (obviously) has no SUPER privileges and the enable "Logging" radio button in the Admin section is indeed disabled. I thought perhaps logging somehow enabled itself anyhow but this is what I see in the beginning of config_backend:

Code: [Select]
a:78:{s:15:"contactUndelete";s:1:"0";s:7:"logging";s:0:"";s:12:"versionCheck";s:1:"1";s:14:
Any ideas why it's trying to create a trigger?
CiviHosting and CiviOnline -- The CiviCRM hosting experts, since 2007

See here for the official: What to do if you think you've found a bug.

Donald Lobo

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 15963
  • Karma: 470
    • CiviCRM site
  • CiviCRM version: 4.2+
  • CMS version: Drupal 7, Joomla 2.5+
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: Triggers with no Logging
February 08, 2011, 06:47:15 am

i'm pretty sure this has been fixed in 3.3.3. can u upgrade and try

thanx

lobo
A new CiviCRM Q&A resource needs YOUR help to get started. Visit our StackExchange proposed site, sign up and vote on 5 questions

Hershel

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4640
  • Karma: 176
    • CiviHosting
  • CiviCRM version: Latest
  • CMS version: Mostly WordPress and Drupal
Re: Triggers with no Logging
February 10, 2011, 05:06:05 am
Upgraded to 3.3.5 and the problem no longer exists, but any custom fields which are attempted to be deleted before and generated an error, still can not be deleted:

Code: [Select]
ALTER TABLE civicrm_value_hershel_test_24 DROP COLUMN `hershel_test_239`
[nativecode=1091 ** Can't DROP 'hershel_test_239'; check that column/key exists]

I could add that field manually of course (so then CiviCRM could delete it), but I'm not 100% where else in the DB the details regarding this field are stored, aside of course from civicrm_custom_field. For this field I do see a record in civicrm_custom_field but I'm not 100% convinced that adding the field manually to the civicrm_value_hershel_test_24 table may not make things worse.

Although I'm inclined to try. :)

What do you think?
CiviHosting and CiviOnline -- The CiviCRM hosting experts, since 2007

See here for the official: What to do if you think you've found a bug.

Donald Lobo

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 15963
  • Karma: 470
    • CiviCRM site
  • CiviCRM version: 4.2+
  • CMS version: Drupal 7, Joomla 2.5+
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: Triggers with no Logging
February 10, 2011, 07:08:38 am

i would do the following:

1. delete the entry from civicrm_custom_field
2. truncate civicrm_cache

lobo
A new CiviCRM Q&A resource needs YOUR help to get started. Visit our StackExchange proposed site, sign up and vote on 5 questions

Hershel

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4640
  • Karma: 176
    • CiviHosting
  • CiviCRM version: Latest
  • CMS version: Mostly WordPress and Drupal
Re: Triggers with no Logging
February 12, 2011, 12:58:36 pm
Seems to have worked. Thanks. :)
CiviHosting and CiviOnline -- The CiviCRM hosting experts, since 2007

See here for the official: What to do if you think you've found a bug.

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using Core CiviCRM Functions (Moderator: Yashodha Chaku) »
  • Triggers with no Logging

This forum was archived on 2017-11-26.