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) »
  • Update row: DB Error - already exists: for Profile with more than 30 fields
Pages: [1]

Author Topic: Update row: DB Error - already exists: for Profile with more than 30 fields  (Read 1243 times)

paeinstein

  • Guest
Update row: DB Error - already exists: for Profile with more than 30 fields
July 09, 2008, 06:19:14 am
Hi,

How can I debug my Profile Problems?
Thanks for any suggestions,

Pierre

Hi,

I am running a basic system Drupal 5.7. with CiviCRM 2.0.4.

My customer needs to use profiles with more than 30 self defined fields, arranged in various groups of fields. Everything is ok when you want to create a new contact and call up the profile and fill in the data, also saving the data is no problem and searching and looking at them again after saving.

But when I try to edit the profile fields again, I get an error message. see also the attachement or the Code at the end of this message.

Why is this so, though I have activated the Button ?Include profile edit links in search results?? Does anyone know a way to fix this problem?

I know it is quite a lot of own fields and there are limitations to the possible number of fields, but does anyone have a better idea how to cope with numerous fields?

Thanks for any suggestions,
Pierre

Code: [Select]
the complete error:
Array

(

[callback] => Array

(

[0] => CRM_Core_Error

[1] => handle

)

 => -5

[message] => DB Error: already exists

[mode] => 16

[debug_info] => INSERT INTO civicrm_value_1_Bank_Versicherung SET `Banken` = '', domain_id = 1, entity_id = 2423 [nativecode=1062 ** Duplicate entry '1-2423' for key 2]

[type] => DB_Error

[user_info] => INSERT INTO civicrm_value_1_Bank_Versicherung SET `Banken` = '', domain_id = 1, entity_id = 2423 [nativecode=1062 ** Duplicate entry '1-2423' for key 2]

[to_string] => [db_error: message="DB Error: already exists" code=-5 mode=callback callback=CRM_Core_Error::handle prefix="" info="INSERT INTO civicrm_value_1_Bank_Versicherung SET `Banken` = '', domain_id = 1, entity_id = 2423 [nativecode=1062 ** Duplicate entry '1-2423' for key 2]"]
« Last Edit: July 14, 2008, 03:10:04 am by paeinstein »

Yashodha Chaku

  • Forum Godess / God
  • Ask me questions
  • *****
  • Posts: 755
  • Karma: 57
    • CiviCRM
Re: Update row: DB Error - already exists: for Profile with more than 30 fields
July 16, 2008, 03:10:58 am
Seems very weird, Can you replicate on http://drupal.demo.civicrm.org/

-Yashodha
« Last Edit: July 16, 2008, 03:13:57 am by Yashodha Chaku »
Found this reply helpful? Contribute NOW and help us improve CiviCRM with the Make it Happen! initiative.

paeinstein

  • Guest
Re: Update row: DB Error - already exists: for Profile with more than 30 fields
July 30, 2008, 12:07:33 pm
Hi Yashoda,

I followed your request to replicate the problem on Drupal demo. By doing so I tried to check simultanousely for possible reasons of the error . My first assumption was wrong – the number of fields is definitely not the reason for the problems. So I went into it deeper and tested systematically and consistently.

Thus I found out that the problem occurs only with fields of the checkbox -type.

If you are editing data and select no option in the checkbox field and then save the data, then the database error posted below will occur.

If you select an option everything will be fine and functioning properly.


See also http://drupal.demo.civicrm.org/civicrm/profile?reset=1&gid=5

Please enter „test“ in the lastname field, then click „search“ and then „edit“.


If no options are selected in search criteria, the following error message appears:

Code: [Select]
unrecoverable error
    Sorry. A non-recoverable error has occurred.

    DB Error: already exists

    Database Error Code: Duplicate entry '1-419' for key 2, 1062

    Return to home page.

Error Details:

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

    [code] => -5
    [message] => DB Error: already exists
    [mode] => 16
    [debug_info] => INSERT INTO civicrm_value_1_testcheckbox_10  SET `checkboxen` = '', domain_id = 1, entity_id = 419  [nativecode=1062 ** Duplicate entry '1-419' for key 2]
    [type] => DB_Error
    [user_info] => INSERT INTO civicrm_value_1_testcheckbox_10  SET `checkboxen` = '', domain_id = 1, entity_id = 419  [nativecode=1062 ** Duplicate entry '1-419' for key 2]
    [to_string] => [db_error: message="DB Error: already exists" code=-5 mode=callback callback=CRM_Core_Error::handle prefix="" info="INSERT INTO civicrm_value_1_testcheckbox_10  SET `checkboxen` = '', domain_id = 1, entity_id = 419  [nativecode=1062 ** Duplicate entry '1-419' for key 2]"]
)


I hope to have made my point clear.

Thank you Pierre[/code]

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: Update row: DB Error - already exists: for Profile with more than 30 fields
July 30, 2008, 03:38:48 pm

Hey pierre:

i think i might have fixed this in 2.1

Can you reproduce the issue on http://sandbox.civicrm.org/

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

paeinstein

  • Guest
Re: Update row: DB Error - already exists: for Profile with more than 30 fields
July 31, 2008, 02:31:11 pm
Hey Lobo,

Thank you very much, but this error has been already debugged in civiCRM 2.1 . All my tests proved positive! You can take a look et my tests also on http://sandbox.civicrm.org/civicrm/profile?reset=1&gid=2 (My Test are already deleted!!).

Thanks again for your friendly help,

Pierre

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using Core CiviCRM Functions (Moderator: Yashodha Chaku) »
  • Update row: DB Error - already exists: for Profile with more than 30 fields

This forum was archived on 2017-11-26.