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) »
  • Table '[tablename].log_civicrm_value_contact_type_1' doesn't exist, 1146
Pages: [1]

Author Topic: Table '[tablename].log_civicrm_value_contact_type_1' doesn't exist, 1146  (Read 3886 times)

Simon147

  • I post occasionally
  • **
  • Posts: 96
  • Karma: 3
  • CiviCRM version: 4.4.6
  • CMS version: Drupal 7.30
  • MySQL version: 5.0.92
  • PHP version: 5.2.9
Table '[tablename].log_civicrm_value_contact_type_1' doesn't exist, 1146
January 08, 2011, 12:21:33 pm
Hello all,

I've upgraded my CiviCRM from version 3.2.5 to 3.3.2 (on drupal 6.20). I've added a new contact without a problem, but when trying to add a second contact, I got the following error message:

Code: [Select]
Sorry. A non-recoverable error has occurred.
DB Error: no such table
Error Details
Database Error Code: Table 'hubvd_civicrm.log_civicrm_value_contact_type_1' doesn't exist, 1146
Additional Details:

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

    [code] => -18
    [message] => DB Error: no such table
    [mode] => 16
    [debug_info] => INSERT INTO civicrm_value_contact_type_1  ( hub_membership_status_2_3,entity_id ) VALUES ( 6,24 ) ON DUPLICATE KEY UPDATE hub_membership_status_2_3 = 6 [nativecode=1146 ** Table 'hubvd_civicrm.log_civicrm_value_contact_type_1' doesn't exist]
    [type] => DB_Error
    [user_info] => INSERT INTO civicrm_value_contact_type_1  ( hub_membership_status_2_3,entity_id ) VALUES ( 6,24 ) ON DUPLICATE KEY UPDATE hub_membership_status_2_3 = 6 [nativecode=1146 ** Table 'hubvd_civicrm.log_civicrm_value_contact_type_1' doesn't exist]
    [to_string] => [db_error: message="DB Error: no such table" code=-18 mode=callback callback=CRM_Core_Error::handle prefix="" info="INSERT INTO civicrm_value_contact_type_1  ( hub_membership_status_2_3,entity_id ) VALUES ( 6,24 ) ON DUPLICATE KEY UPDATE hub_membership_status_2_3 = 6 [nativecode=1146 ** Table 'hubvd_civicrm.log_civicrm_value_contact_type_1' doesn't exist]"]
)

I've found another forum thread about this, but I can confirm that in my case, the drupal table prefix is set properly, since I can access the data in my database without problem (even modify existing data). The problem seams to occur only if I want to add new contacts.

Any idea on what went wrong? [/code]

Kurund Jalmi

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4169
  • Karma: 128
    • CiviCRM
  • CiviCRM version: 4.x, future
  • CMS version: Drupal 7, Joomla 3.x
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: Table '[tablename].log_civicrm_value_contact_type_1' doesn't exist, 1146
January 09, 2011, 11:28:47 am
Have you enabled logging feature in 3.3.2 ?

Kurund
Found this reply helpful? Support CiviCRM

Simon147

  • I post occasionally
  • **
  • Posts: 96
  • Karma: 3
  • CiviCRM version: 4.4.6
  • CMS version: Drupal 7.30
  • MySQL version: 5.0.92
  • PHP version: 5.2.9
Re: Table '[tablename].log_civicrm_value_contact_type_1' doesn't exist, 1146
January 09, 2011, 01:19:33 pm
No, logging (if others search for that, you find it in Administer CRM -> Global Settings -> Miscellaneous) is currently not activated. Actually, the option is grayed out with a mention that this is still a beta feature, so I can not even change that. Should I activate it? And if yes, how? 

jkounis

  • I’m new here
  • *
  • Posts: 14
  • Karma: 0
  • CiviCRM version: 3.3.2
  • CMS version: Drupal 6.20
  • MySQL version: 5.1
  • PHP version: 5.3
Re: Table '[tablename].log_civicrm_value_contact_type_1' doesn't exist, 1146
January 17, 2011, 04:09:02 am
Have you found a solution for this problem yet? I have the same problem that is preventing me from importing contacts:

INSERT INTO civicrm_value_raf_member_data_1  gave an error "Table 'therafor_civicrm3.log_civicrm_value_raf_member_data_1' doesn't exist]"

In my case it certainly looks like the table prefix is missing in my case too.

P.S. I tried to cut and paste the actual error message wrapped in code or quote tags, but the forum complained that "Sorry, you are not allowed to post external links." Is that working?

jkounis

  • I’m new here
  • *
  • Posts: 14
  • Karma: 0
  • CiviCRM version: 3.3.2
  • CMS version: Drupal 6.20
  • MySQL version: 5.1
  • PHP version: 5.3
Re: Table '[tablename].log_civicrm_value_contact_type_1' doesn't exist, 1146
January 17, 2011, 04:18:42 am
Well, I found the answer:

The problem has to do with the fact that logging had created triggers before I had a chance to disable it. To fix it, I did the following:

mysql> use civicrm_database;
mysql> show triggers;
mysql> drop trigger XXXX (for every trigger listed by the show triggers command).

I'm sure this warrants a bug report. This is a brand new installation of 3.3.2. My steps were:

1. Install civicrm
2. Create a bunch of custom fields
3. Import data


Simon147

  • I post occasionally
  • **
  • Posts: 96
  • Karma: 3
  • CiviCRM version: 4.4.6
  • CMS version: Drupal 7.30
  • MySQL version: 5.0.92
  • PHP version: 5.2.9
Re: Table '[tablename].log_civicrm_value_contact_type_1' doesn't exist, 1146
January 17, 2011, 06:02:37 am
Hello Jkounis,

I also thought that it might be good to file a bug report for that. Did you already do it (or are you working at it) or shall I? I'm afraid my understanding of what has triggered the problem is too little, so I would prefer if you could do it.

On my part, if I run "show triggers;" on my database, I don't get any results... ??

Simon

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: Table '[tablename].log_civicrm_value_contact_type_1' doesn't exist, 1146
January 17, 2011, 04:52:22 pm

jkounis:

did you enable logging at all in 3.3.2? or did CiviCRM automatically enable it?

AT what point did u enable it and at what point did your system stop supporting triggers?

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

jkounis

  • I’m new here
  • *
  • Posts: 14
  • Karma: 0
  • CiviCRM version: 3.3.2
  • CMS version: Drupal 6.20
  • MySQL version: 5.1
  • PHP version: 5.3
Re: Table '[tablename].log_civicrm_value_contact_type_1' doesn't exist, 1146
January 17, 2011, 08:44:13 pm
I did not enable logging in my install, but I didn't disable it either. I simply did not answer the question.

When I visited Administer -> Configuration -> Global Settings -> Miscellaneous, neither yes nor no were checked on my brand-new installation. I simply accepted the defaults and proceeded with the creation of custom fields and data import (which failed).

I should be a little more specific on the sequence of steps:

  • Install Drupal 6.20
  • Install CiviCRM 3.3.2 (database permissions for the DB user: "GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, INDEX, ALTER, CREATE TEMPORARY TABLES, LOCK TABLES")
  • Don't bother to select either "yes" or "no" in the Logging options
  • Create some custom fields
  • Delete a custom field and get some error that I need to grant "SUPER" privilege to the civicrm database user because I have binary logging enabled (I thought this had to do with the fact that I'm using the mysql binlog... not that it had anything to do with the civicrm logging function)
  • Grant the user SUPER privilege
  • Create/delete more custom fields
  • Get an error that the user needs CREATE TRIGGER privilege
  • Grant the user CREATE TRIGGER privilege
  • Create/delete more custom fields
  • Attempt to import data
  • Bomb with an error that I can't cut and paste here because the forum tells me I can't post hyperlinks(?)
  • Visit "Administer -> Configuration -> Global Settings -> Miscellaneous" and discover that neither "yes" nor "no" are selected.... Select "No" and click "Save"
  • Delete all triggers on the civicrm database
  • It works! Yaaayyyy!

Should I file a bug report?
« Last Edit: January 17, 2011, 08:47:34 pm by jkounis »

Simon147

  • I post occasionally
  • **
  • Posts: 96
  • Karma: 3
  • CiviCRM version: 4.4.6
  • CMS version: Drupal 7.30
  • MySQL version: 5.0.92
  • PHP version: 5.2.9
Re: Table '[tablename].log_civicrm_value_contact_type_1' doesn't exist, 1146
January 18, 2011, 01:17:03 am
I just read that here that "Due to its heavy trigger (ab)use, currently logging cannot be used with multilingual CiviCRM installations".

In my case, I can't even deactivate this, because the options are just grayed out (see my forum post about that).

Simon


jkounis

  • I’m new here
  • *
  • Posts: 14
  • Karma: 0
  • CiviCRM version: 3.3.2
  • CMS version: Drupal 6.20
  • MySQL version: 5.1
  • PHP version: 5.3
Re: Table '[tablename].log_civicrm_value_contact_type_1' doesn't exist, 1146
January 19, 2011, 12:24:17 pm
CAVEAT: I am not a CiviCRM developer. I just recently discovered it and I've been using it for about 10 days.

I reinstalled CiviCRM and it was grayed out too. I disabled it as follows:
  • Use phpMyAdmin and edit the table civicrm_domain table. (There will be one row for every domain. (Likely you will only have one row in this table for your domain.)
  • The config_backend field will have a lot of gobbledygook in it. Carefully edit the text to change the following string:
    s:7:"logging";s:0:""
    TO:
    s:7:"logging";s:1:"0"
    You don't want to accidentally type a character and insert a stray semicolon or quote, or you'll mess up all your domain options.
  • Save the field.

I believe this should work, but I offer no guarantees, since I lack a fundamental understanding of the CiviCRM database schema and options handling.

I welcome comments about the above procedure... Is it a good or a bad idea to edit options like this?

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: Table '[tablename].log_civicrm_value_contact_type_1' doesn't exist, 1146
January 19, 2011, 03:03:26 pm

editing serialized fields is not recommended.

i also think there might be an issue with item 2, since the length changes with the 2 strings (the second has one more characters than the first)

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

Simon147

  • I post occasionally
  • **
  • Posts: 96
  • Karma: 3
  • CiviCRM version: 4.4.6
  • CMS version: Drupal 7.30
  • MySQL version: 5.0.92
  • PHP version: 5.2.9
Re: Table '[tablename].log_civicrm_value_contact_type_1' doesn't exist, 1146
January 22, 2011, 01:26:59 am
I've just installed Version 3.3.3 and it looks like this solved the problem.

Thanks to the developers.

Simon

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using Core CiviCRM Functions (Moderator: Yashodha Chaku) »
  • Table '[tablename].log_civicrm_value_contact_type_1' doesn't exist, 1146

This forum was archived on 2017-11-26.