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 »
  • Post-installation Setup and Configuration (Moderator: Dave Greenberg) »
  • Sorry. A non-recoverable error has occurred.
Pages: [1]

Author Topic: Sorry. A non-recoverable error has occurred.  (Read 2675 times)

waizen

  • I’m new here
  • *
  • Posts: 13
  • Karma: 0
  • CiviCRM version: 3.3.3
  • CMS version: Drupal 6.2
  • MySQL version: 5.0.67
  • PHP version: 5.2.10
Sorry. A non-recoverable error has occurred.
March 07, 2011, 01:37:45 pm
I've set up multiple forms on my site, each representing registration forms that visitors can use to sign up for running events at a marathon. I thought I had resolved some issues, which are covered in this thread:

http://forum.civicrm.org/index.php/topic,18902.0.html

The problem I'm having now is that as soon as one fills in all of the fields and submits the form, an error message comes up that reads:

"Sorry. A non-recoverable error has occurred.
DB Error: constraint violation
Error Details
Return to home page."

When you expand the error by clicking on "Error Details," you see this:

Code: [Select]
Database Error Code: Cannot add or update a child row: a foreign key constraint fails (`crowleyr_civiCRM/civicrm_value_half_marathon_field_set_4`, CONSTRAINT `FK_civicrm_value_half_marathon_fiel_a78f1e32972f60d9` FOREIGN KEY (`entity_id`) REFERENCES `civicrm_event` (`id`) ON DEL), 1452
Additional Details:

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

    [code] => -3
    [message] => DB Error: constraint violation
    [mode] => 16
    [debug_info] => INSERT INTO civicrm_value_half_marathon_field_set_4  ( first_name_7,last_name_8,address_26,city_or_town_9,state_10,zip_code_11,daytime_phone_13,date_of_birth_14,age_on_race_day_15,gender_16,relay_team_name__if_applicable__17,relay_team_member_1_name__if_app_18,relay_team_member_1_gender__if_a_20,relay_team_member_1_age__if_appl_21,relay_team_member_2_name__if_app_22,relay_team_member_2_gender__if_a_23,relay_team_member_2_age__if_appl_24,waiver_to_be_read_and_agreed_to_25,entity_id ) VALUES ( 'Willi','Waizenegger','123 Main Street','Rutland','Arizona','05701','802-773-0126','5/6/59','52','Male','The Ramrods','John Memberone','Male','50','Jane Membertwo','Female','40','I agree',67 ) ON DUPLICATE KEY UPDATE first_name_7 = 'Willi',last_name_8 = 'Waizenegger',address_26 = '123 Main Street',city_or_town_9 = 'Rutland',state_10 = 'Arizona',zip_code_11 = '05701',daytime_phone_13 = '802-773-0126',date_of_birth_14 = '5/6/59',age_on_race_day_15 = '52',gender_16 = 'Male',relay_team_name__if_applicable__17 = 'The Ramrods',relay_team_member_1_name__if_app_18 = 'John Memberone',relay_team_member_1_gender__if_a_20 = 'Male',relay_team_member_1_age__if_appl_21 = '50',relay_team_member_2_name__if_app_22 = 'Jane Membertwo',relay_team_member_2_gender__if_a_23 = 'Female',relay_team_member_2_age__if_appl_24 = '40',waiver_to_be_read_and_agreed_to_25 = 'I agree' [nativecode=1452 ** Cannot add or update a child row: a foreign key constraint fails (`crowleyr_civiCRM/civicrm_value_half_marathon_field_set_4`, CONSTRAINT `FK_civicrm_value_half_marathon_fiel_a78f1e32972f60d9` FOREIGN KEY (`entity_id`) REFERENCES `civicrm_event` (`id`) ON DEL)]
    [type] => DB_Error
    [user_info] => INSERT INTO civicrm_value_half_marathon_field_set_4  ( first_name_7,last_name_8,address_26,city_or_town_9,state_10,zip_code_11,daytime_phone_13,date_of_birth_14,age_on_race_day_15,gender_16,relay_team_name__if_applicable__17,relay_team_member_1_name__if_app_18,relay_team_member_1_gender__if_a_20,relay_team_member_1_age__if_appl_21,relay_team_member_2_name__if_app_22,relay_team_member_2_gender__if_a_23,relay_team_member_2_age__if_appl_24,waiver_to_be_read_and_agreed_to_25,entity_id ) VALUES ( 'Willi','Waizenegger','123 Main Street','Rutland','Arizona','05701','802-773-0126','5/6/59','52','Male','The Ramrods','John Memberone','Male','50','Jane Membertwo','Female','40','I agree',67 ) ON DUPLICATE KEY UPDATE first_name_7 = 'Willi',last_name_8 = 'Waizenegger',address_26 = '123 Main Street',city_or_town_9 = 'Rutland',state_10 = 'Arizona',zip_code_11 = '05701',daytime_phone_13 = '802-773-0126',date_of_birth_14 = '5/6/59',age_on_race_day_15 = '52',gender_16 = 'Male',relay_team_name__if_applicable__17 = 'The Ramrods',relay_team_member_1_name__if_app_18 = 'John Memberone',relay_team_member_1_gender__if_a_20 = 'Male',relay_team_member_1_age__if_appl_21 = '50',relay_team_member_2_name__if_app_22 = 'Jane Membertwo',relay_team_member_2_gender__if_a_23 = 'Female',relay_team_member_2_age__if_appl_24 = '40',waiver_to_be_read_and_agreed_to_25 = 'I agree' [nativecode=1452 ** Cannot add or update a child row: a foreign key constraint fails (`crowleyr_civiCRM/civicrm_value_half_marathon_field_set_4`, CONSTRAINT `FK_civicrm_value_half_marathon_fiel_a78f1e32972f60d9` FOREIGN KEY (`entity_id`) REFERENCES `civicrm_event` (`id`) ON DEL)]
    [to_string] => [db_error: message="DB Error: constraint violation" code=-3 mode=callback callback=CRM_Core_Error::handle prefix="" info="INSERT INTO civicrm_value_half_marathon_field_set_4  ( first_name_7,last_name_8,address_26,city_or_town_9,state_10,zip_code_11,daytime_phone_13,date_of_birth_14,age_on_race_day_15,gender_16,relay_team_name__if_applicable__17,relay_team_member_1_name__if_app_18,relay_team_member_1_gender__if_a_20,relay_team_member_1_age__if_appl_21,relay_team_member_2_name__if_app_22,relay_team_member_2_gender__if_a_23,relay_team_member_2_age__if_appl_24,waiver_to_be_read_and_agreed_to_25,entity_id ) VALUES ( 'Willi','Waizenegger','123 Main Street','Rutland','Arizona','05701','802-773-0126','5/6/59','52','Male','The Ramrods','John Memberone','Male','50','Jane Membertwo','Female','40','I agree',67 ) ON DUPLICATE KEY UPDATE first_name_7 = 'Willi',last_name_8 = 'Waizenegger',address_26 = '123 Main Street',city_or_town_9 = 'Rutland',state_10 = 'Arizona',zip_code_11 = '05701',daytime_phone_13 = '802-773-0126',date_of_birth_14 = '5/6/59',age_on_race_day_15 = '52',gender_16 = 'Male',relay_team_name__if_applicable__17 = 'The Ramrods',relay_team_member_1_name__if_app_18 = 'John Memberone',relay_team_member_1_gender__if_a_20 = 'Male',relay_team_member_1_age__if_appl_21 = '50',relay_team_member_2_name__if_app_22 = 'Jane Membertwo',relay_team_member_2_gender__if_a_23 = 'Female',relay_team_member_2_age__if_appl_24 = '40',waiver_to_be_read_and_agreed_to_25 = 'I agree' [nativecode=1452 ** Cannot add or update a child row: a foreign key constraint fails (`crowleyr_civiCRM/civicrm_value_half_marathon_field_set_4`, CONSTRAINT `FK_civicrm_value_half_marathon_fiel_a78f1e32972f60d9` FOREIGN KEY (`entity_id`) REFERENCES `civicrm_event` (`id`) ON DEL)]"]
)

Much of that is the contents of the filled-in form, but hopefully someone out there can make heads or tails about what the error is all about. Thank you in advance.

Hershel

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4640
  • Karma: 176
    • CiviHosting
  • CiviCRM version: Latest
  • CMS version: Mostly WordPress and Drupal
Re: Sorry. A non-recoverable error has occurred.
March 08, 2011, 03:21:29 am
I'm really not sure what is happening with your site, but this error appears to be that CiviCRM is trying to store this data with a reference to event id #67, but that event apparently doesn't exist.

Does that help?

Without more details, it's a bit difficult to debug this.
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.

waizen

  • I’m new here
  • *
  • Posts: 13
  • Karma: 0
  • CiviCRM version: 3.3.3
  • CMS version: Drupal 6.2
  • MySQL version: 5.0.67
  • PHP version: 5.2.10
Re: Sorry. A non-recoverable error has occurred.
March 08, 2011, 06:25:53 am
Quote from: hershel on March 08, 2011, 03:21:29 am
I'm really not sure what is happening with your site, but this error appears to be that CiviCRM is trying to store this data with a reference to event id #67, but that event apparently doesn't exist.

Does that help?

Without more details, it's a bit difficult to debug this.

Thank you for responding.

I have multiple forms on the site and they all give me similar error messages, yet they all reference different id numbers. This one is 67, but another was 70 and yet another one was 69, etc.

I have the feeling my (multiple) problems with this install stem from something deeper. Unfortunately, I have a client who is breathing down my neck.

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: Sorry. A non-recoverable error has occurred.
March 08, 2011, 06:37:09 am

did you copy any custom groups and change the type either the DB or the UI?

seems like your custom group (or profile) is extending event. Any profile embedded in an Event registration needs to extend participants.

Not sure how this happens (but it has happened to other people and is a bug). If you can reproduce it, that would be great and highly appreciated.

For now, i would recreate the custom groups and profile that is used in the event reg

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

waizen

  • I’m new here
  • *
  • Posts: 13
  • Karma: 0
  • CiviCRM version: 3.3.3
  • CMS version: Drupal 6.2
  • MySQL version: 5.0.67
  • PHP version: 5.2.10
Re: Sorry. A non-recoverable error has occurred.
March 08, 2011, 08:00:52 am
First, let me state that the level of response from all of you folks regarding my problem(s) has proven that this is a top-notch program. I thank you all for all your help so far. You folks rock!

Here is what I'm thinking so far:

1. When I make the program take information without the custom forms I created, it seems to work okay. In other words, let's say I go to Events>Manage Events>(event name)Configure>Online Registration and set 'Include Profile (top of page)' to 'select', 'Include Profile (bottom of page' to 'Select', 'Profile for Additional Participants (top of page)' to 'no profile' and 'Profile for Additional Participants (bottom of page)' to 'no profile' and uncheck 'Allow multiple registration from the same email address?' After all that, I log out as Admin and go to the page to register, just as an anonymouse visitor would. I register and everything is fine.

2.  I then create a whole new profile...not just copying the profile I already have and changing its name...a whole new one and then assigning that to an event. I see the same error messages.

So, I think that is telling me that the core ability of the program to register a visitor is working okay. So, something about the way I'm creating forms must be screwy perhaps?

At the risk of making any of you fall asleep, I'm going to outline the exact proceedure, step by step, as to how I go about creating a form on my site and hope that one of you will spot my source of idiocy. Here it goes:

1. In Drupal 6.2, I go to the CiviCRM link and at the top, I go to Administer>Customize>Custom Data. I create a new field set and add my custom fields. Each of the fields are classified as 'Participants'
2. I go to Administer>Customize>CiviCRM Profile and then click on 'Add Profile'. I give the profile a name and click save.
3. In the resulting page, I select 'Participants' from the first dropdown and just to the right of it is a new dropdown where I select the first field from the batch I created in the custom data (see step 1 above). Under 'Visibility' I choose 'Public Pages and Listings'. Click 'Save and New' and proceed with the same thing for each field I need to create.
4. Go to Events>New Event (or click 'Add Event' from 'Manage Events') to create my event (and, to my understanding, the actual page on my site).
5. At this point, each of my events are set up the same way, which is to fill in the fields like this:
a. Event Type: 'Performance'
b. Participant Role: 'Attendee'
c. Participant Listing: 'Disabled'
d. Event Title: (the name of the event)
e. Event Summary: (a short summary of the event)
f. complete Description (the body copy of my page)
g. Start Date:/Time (the start date and time of the event)
h. End Date/Time: left it blank
i. Include Map to Event Location? (left unchecked)
j. Public Event? (checked)
k. Is this Event Active? (checked)

Next page (Event Location) is set as:

l. Choose Location: 'Use existing location'
m. Use location: (location of event)
n. add the rest of the location fields on that page. Hit save

Next page (Online Registration) is set as:

o. Allow Online Registration? (checked)
p. Registration Link Text: 'Register Now'
q. Register multiple participants? (checked)
r. Allow multiple registrations from the same email address? (checked)
s. Pending participant expiration (hours) (left blank)
t. Introductory Text and Footer Text left blank
u. Include Profile (top of page): selected name of profile I created in step 2 above
v. Include Profile (bottom of page): 'select'
w. Profile for Additional Participants (top of page): 'no profile'
x. Profile for Additional Participants (bottom of page): 'no profile'
y. The rest of the text fields left blank
z. Send Confirmation Email? 'no'

6. Click save and then test the form by logging out as admin and visiting page on site.
7. Bang my head against the wall because I encounter that error message.

So, that's my procedure. Thank you for bearing with me here. I really need to solve this problem very soon.
« Last Edit: March 08, 2011, 08:03:21 am by waizen »

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: Sorry. A non-recoverable error has occurred.
March 08, 2011, 09:32:43 am

can you do the same set of steps on our demo server (drupal.demo.civicrm.org) and see if you can reproduce it

if i had to guess, there were some steps/changes during the custom group creation which triggers the bug

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

waizen

  • I’m new here
  • *
  • Posts: 13
  • Karma: 0
  • CiviCRM version: 3.3.3
  • CMS version: Drupal 6.2
  • MySQL version: 5.0.67
  • PHP version: 5.2.10
Re: Sorry. A non-recoverable error has occurred.
March 08, 2011, 11:53:28 am
Quote from: Donald Lobo on March 08, 2011, 09:32:43 am

can you do the same set of steps on our demo server (drupal.demo.civicrm.org) and see if you can reproduce it

if i had to guess, there were some steps/changes during the custom group creation which triggers the bug

lobo

Thanks for responding, Donald.

I just recreated my steps on the demo site. In short, I had partial success.

Not sure how long the files will last up on the demo server, but if you would like to take a look:

1. The profile is called 'Test-Profile'
2. The Custom Data is called 'Form_Page_Test'
3. The event is called 'Test Event'

When I tested the resulting form, it did go through, although I noticed that my fictional name did not make it to the listing of participants. The registration was there, but not my fictional name ('John Smithie'). Neither was the copy I entered to appear on the registration page (a lot of 'lorem ipsim' dummy copy) and some other info.

While it lasts, the address of the resulting form is located at:
http://drupal.demo.civicrm.org/civicrm/event/info?reset=1&id=10

Thanks.
« Last Edit: March 09, 2011, 06:06:45 am by waizen »

waizen

  • I’m new here
  • *
  • Posts: 13
  • Karma: 0
  • CiviCRM version: 3.3.3
  • CMS version: Drupal 6.2
  • MySQL version: 5.0.67
  • PHP version: 5.2.10
Re: Sorry. A non-recoverable error has occurred.
March 09, 2011, 06:50:28 am
Playing with the demo some more, I was able to get the body copy to show up now (the 'Lorem ipsum' dummy copy stuff only). Not sure why it didn't show up before.
« Last Edit: March 09, 2011, 07:05:13 am by waizen »

waizen

  • I’m new here
  • *
  • Posts: 13
  • Karma: 0
  • CiviCRM version: 3.3.3
  • CMS version: Drupal 6.2
  • MySQL version: 5.0.67
  • PHP version: 5.2.10
Re: Sorry. A non-recoverable error has occurred.
March 09, 2011, 07:39:44 am
I'm a bit confused now. I just tried entering info on the demo site again under a different fictitious name (John Wapp) and the participant details now show up in the list of participants.

Did anyone change anything behind the scenes that might be of help?

Deepak Srivastava

  • Ask me questions
  • ****
  • Posts: 677
  • Karma: 65
Re: Sorry. A non-recoverable error has occurred.
March 09, 2011, 09:59:51 am
Some of the tabs were disabled on demo including event tab, which i enabled. And i had tested signing up your event which worked for me.

Seems like you using 3.3.3, could you try using the latest 3.3 version and see if that works for you.
Found this reply helpful? Contribute NOW and help us improve CiviCRM with the Make it Happen! initiative.

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Post-installation Setup and Configuration (Moderator: Dave Greenberg) »
  • Sorry. A non-recoverable error has occurred.

This forum was archived on 2017-11-26.