mecachisenros / cf-civicrm

Caldera Forms CiviCRM Integration
GNU Affero General Public License v3.0
30 stars 26 forks source link

Cannot submit form: "case_id is not a valid integer" #117

Closed yannchwen closed 5 years ago

yannchwen commented 5 years ago

Describe the bug The Caldera form on my client's website won't take submissions.

To Reproduce Steps to reproduce the behavior:

  1. Go to 'https://apprenticelearning.org/get-involved/host-a-workplace-exploration/'
  2. Fill out the form
  3. See error: "case_id is not a valid integer

0 /var/www/colet/wordpress/wp-content/plugins/caldera-forms-civicrm/processors/activity/class-activity-processor.php(90): civicrm_api3('Activity', 'create', Array)

1 /var/www/colet/wordpress/wp-content/plugins/caldera-forms/classes/core.php(3273): CiviCRM_Caldera_Forms_Activity_Processor->pre_processor(Array, Array, '_cf_process_5d2...')

2 /var/www/colet/wordpress/wp-content/plugins/caldera-forms/classes/core.php(5203): Caldera_Forms::process_submission()

3 /var/www/colet/wordpress/wp-content/plugins/caldera-forms/classes/core.php(3821): Caldera_Forms::process_form_via_post()

4 /var/www/colet/wordpress/wp-includes/class-wp-hook.php(286): Caldera_Forms->cf_init_system('')

5 /var/www/colet/wordpress/wp-includes/class-wp-hook.php(310): WP_Hook->apply_filters(NULL, Array)

6 /var/www/colet/wordpress/wp-includes/plugin.php(465): WP_Hook->do_action(Array)

7 /var/www/colet/wordpress/wp-settings.php(546): do_action('wp_loaded')

8 /var/www/colet/wordpress/wp-config.php(132): require_once('/var/www/colet/...')

9 /var/www/colet/wordpress/wp-load.php(37): require_once('/var/www/colet/...')

10 /var/www/colet/wordpress/wp-blog-header.php(13): require_once('/var/www/colet/...')

11 /var/www/colet/wordpress/index.php(17): require('/var/www/colet/...')

12 {main}"

Expected behavior I expected that I could fill out the form and submit it.

Screenshots Screen Shot 2019-07-08 at 10 16 10 PM Screen Shot 2019-07-08 at 10 16 23 PM

Desktop (please complete the following information):

danaskallman commented 5 years ago

@yannchwen I worked with ya'll to set Civi up. Just took a look and case isn't being used so make sure those fields are blank in the processors. If you need support have Helen email me if needed.

mecachisenros commented 5 years ago

@yannchwen please add an export of the form in json format here, it's difficult to tell what's going on without it, the Activity processor must be placed after the Case processor, if it's not, as the error suggests, there's no case_id as the case has not yet been created.

mecachisenros commented 5 years ago

@yannchwen if the the error appears when the Do not create Case if the contact already has a Case of same type setting is enabled, it should be fixed via be5fe7ef4970ae4d8907f24a282fc47e466ca676.