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 (Moderator: Dave Greenberg) »
  • DB Error: unknown error.. [ Identifier too long]
Pages: [1]

Author Topic: DB Error: unknown error.. [ Identifier too long]  (Read 539 times)

Aahar

  • I post occasionally
  • **
  • Posts: 79
  • Karma: 3
  • CiviCRM version: 3.4 and 4.0
  • CMS version: Drupal 6.17, 6.x and Drupal 7.x
  • PHP version: 5.2
DB Error: unknown error.. [ Identifier too long]
February 18, 2015, 11:47:16 pm
When I create Custom data set I get this error. However, the Custom Data Set gets created.
I checked the files in ConfigAndLog. The part of log is shown below.

I first got this error first when I was enabling the "Feeds Importer" of Feeds module.
Please suggest me how to resolve this:

================================================================


Feb 19 12:51:31  [info] $Fatal Error Details = Array
(
    [callback] => Array
        (
           
  • => CRM_Core_Error
  • [1] => handle
            )

       
Code: [Select]
=> -1
    [message] => DB Error: unknown error
    [mode] => 16
    [debug_info] => DROP TRIGGER IF EXISTS civicrm_value_details_of_the_attending_member_fields_137_after_insert [nativecode=1059 ** Identifier name 'civicrm_value_details_of_the_attending_member_fields_137_after_insert' is too long]
    ...
....
)


Feb 19 12:51:31  [info] $backTrace = #0 /home/members/www/mysite/sites/all/modules/civicrm/CRM/Core/Error.php(196): CRM_Core_Error::backtrace("backTrace", TRUE)
#1 [internal function](): CRM_Core_Error::handle(Object(DB_Error))
#2 /home/members/www/mysite/sites/all/modules/civicrm/packages/PEAR.php(931): call_user_func((Array:2), Object(DB_Error))
#3 /home/members/www/mysite/sites/all/modules/civicrm/packages/DB.php(969): PEAR_Error->PEAR_Error("DB Error: unknown error", -1, 16, (Array:2), "DROP TRIGGER IF EXISTS civicrm_value_details_of_the_attending_member_fields_1...")

joanne

  • Administrator
  • Ask me questions
  • *****
  • Posts: 852
  • Karma: 83
  • CiviCRM version: 4.4.16
  • CMS version: Drupal 7
Re: DB Error: unknown error.. [ Identifier too long]
February 19, 2015, 12:40:50 am
The error is 'civicrm_value_details_of_the_attending_member_fields_137_after_insert' is too long.   Have you tried shortening the identifier? In practice this would mean shortening the name of your custom data set from "details of the attending member fields" to something like "Attendee info"

I think that you may have to change the custom_group.table_name and the name of the table  civicrm_value_details_of_the_attending_member_fields_137 directly in the database (and perhaps also log_civicrm_value_details_of_the_attending_member_fields_137 if you have logging enabled.)


Aahar

  • I post occasionally
  • **
  • Posts: 79
  • Karma: 3
  • CiviCRM version: 3.4 and 4.0
  • CMS version: Drupal 6.17, 6.x and Drupal 7.x
  • PHP version: 5.2
Re: DB Error: unknown error.. [ Identifier too long]
February 19, 2015, 11:58:35 am
I will try.
I guessed that the identifier needs to get shorter, but could not figure out all the place it needs to be done.

joanne

  • Administrator
  • Ask me questions
  • *****
  • Posts: 852
  • Karma: 83
  • CiviCRM version: 4.4.16
  • CMS version: Drupal 7
Re: DB Error: unknown error.. [ Identifier too long]
February 19, 2015, 04:40:36 pm
You should back up your database before you make any changes.

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM (Moderator: Dave Greenberg) »
  • DB Error: unknown error.. [ Identifier too long]

This forum was archived on 2017-11-26.