Answers.Body: <p>I think I found the cause : I forgot to fill the "Fee" tab of the Event Form.</p>
  
  <p>Everything is running OK now</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-06-19T15:26:49.823Z
Answers.LastActivityDate: 2018-06-19T15:26:49.823Z
Answers.UserDisplayName: Jacques-Marie Moranne
Body: <p>Running Civi 4.7.27 / Drupal 7.59</p>
  
  <p>I have developped a rather complex Webform to enable the registration of several participants, with conditionals and associated Contributions, to an Event (I already have had several of this kind without any problem).</p>
  
  <p>But with this one, when I complete the registration, I get an "Unexpected Error".</p>
  
  <p>Then, if I come back to the form (via the browser back arrow), and re-register, everything runs OK.</p>
  
  <p>Of course, I Can't put this webform in production without solving this : any help is welcome.</p>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2018-06-18T10:17:03.653Z
Comments.Text: You got to see Civi, php and drupal log for more information. Its very difficult to provide an answer without having any clue about the error. Turning on Civi debugging might be helpful.
Comments.UserDisplayName: Pradeep Nayak
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2018-06-18T12:41:55.733Z
Comments.Text: Thank you Pradeep. I have turned Civi debugging on ; what next ? (I am not a programmer, thus not accustomed to this)
Comments.UserDisplayName: Jacques-Marie Moranne
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2018-06-18T13:17:49.947Z
Comments.Text: Is there any suspicious thing in logs?
Comments.UserDisplayName: Pradeep Nayak
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2018-06-18T14:18:24.313Z
Comments.Text: Where can I read that ?
Comments.UserDisplayName: Jacques-Marie Moranne
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2018-06-18T14:26:40.413Z
Comments.Text: For drupal - Drupal >> Reports >> Recent Logs. For CiviCRM- /files/civicrm/Confilog/CiviCRM.XXXX.log. php logs -  /var/logs/apache2/error.log
Comments.UserDisplayName: Pradeep Nayak
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2018-06-18T15:30:48.343Z
Comments.Text: For drupal, I don't find any "Recent Logs" Report even (after activating the debugging) ; For Civi, there is nothing in the .log file, but I have some displays : "Undefined index" Notices + "CiviCRM_API3_Exception : entity_id is not a valid integer dans civicrm_api3() (ligne 45 dans /home/bapaparoisse/www/www/sites/all/modules/civicrm/api/api.php)" ; I don't find /var directory
Comments.UserDisplayName: Jacques-Marie Moranne
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2018-06-18T15:32:50.063Z
Comments.Text: ... and this "CiviCRM_API3_Exception" disappears if I re-register (when everything runs OK)
Comments.UserDisplayName: Jacques-Marie Moranne
Tags: <webform-civicrm>
Title: Unexpected Error when registering for an Event via Webform
ThreadText: # Unexpected Error when registering for an Event via Webform
  
  (Asked by: username_0 on 2018-06-18)
  
  Running Civi 4.7.27 / Drupal 7.59
  
  I have developped a rather complex Webform to enable the registration of several participants, with conditionals and associated Contributions, to an Event (I already have had several of this kind without any problem).
  
  But with this one, when I complete the registration, I get an "Unexpected Error".
  
  Then, if I come back to the form (via the browser back arrow), and re-register, everything runs OK.
  
  Of course, I Can't put this webform in production without solving this : any help is welcome.
  
  **Tags:** webform-civicrm
  
  > **Comments:**
  > **username_1**: You got to see Civi, php and drupal log for more information. Its very difficult to provide an answer without having any clue about the error. Turning on Civi debugging might be helpful.  
  > **username_0**: Thank you Pradeep. I have turned Civi debugging on ; what next ? (I am not a programmer, thus not accustomed to this)  
  > **username_1**: Is there any suspicious thing in logs?  
  > **username_0**: Where can I read that ?  
  > **username_1**: For drupal - Drupal >> Reports >> Recent Logs. For CiviCRM- /files/civicrm/Confilog/CiviCRM.XXXX.log. php logs -  /var/logs/apache2/error.log  
  > **username_0**: For drupal, I don't find any "Recent Logs" Report even (after activating the debugging) ; For Civi, there is nothing in the .log file, but I have some displays : "Undefined index" Notices + "CiviCRM_API3_Exception : entity_id is not a valid integer dans civicrm_api3() (ligne 45 dans /home/bapaparoisse/www/www/sites/all/modules/civicrm/api/api.php)" ; I don't find /var directory  
  > **username_0**: ... and this "CiviCRM_API3_Exception" disappears if I re-register (when everything runs OK)  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_0 on 2018-06-19. Score: 1 | Accepted answer
  
  I think I found the cause : I forgot to fill the "Fee" tab of the Event Form.
  
  Everything is running OK now
  
  
  ---
  
  