When saving a submitted entry of a webform with CiviCRM Processing enabled is edited, a non recoverable error is produced and form submission is interrupted. Edited value is not saved.

Error message produced is given below:
Sorry. A non-recoverable error has occurred.
One of parameters (value: Array) is not of the type Integer

When CiviCRM Processing is disabled (essentially Webform CiviCRM integration is disabled), this error doesn't get produced. As such, I'm assuming this is related to Webform CiviCRM module, not related to Webform module.

Drupal Version Used: 6.22
CiviCRM Version Used: 3.4.4

One question, could you give any estimation when 2.x would be released? It has some very nice and useful features that my project could really use.

Thanks for all your hard works.

Comments

shoeb_a’s picture

Priority: Normal » Major
shoeb_a’s picture

The issue may be caused by this code:

$id['cid'] = explode('-', trim($submission->civicrm['contact_id'], '-'));

Line: 749
Function: _webform_civicrm_webform_frontend_form_alter()
File: webform_civicrm_forms.inc

I'm not fully familiar with the code, so don't know what $id['cid'] does and why it needs to be unshifted in line 750 (next line), so I'm not going to alter anything.

Though for me, this fixed the issue

$id['cid'] = $submission->civicrm['contact_id'];

Since $submission->civicrm['contact_id'] is actually an array, it doesn't make sense to trim or explode it. I'm not sure what was the intention here. And can't confirm how the change that I've made gonna affect the whole module, so not giving any fix/patch.

Please confirm me if this is the way to go to fix this issue.

colemanw’s picture

Status: Active » Fixed

Oops. Good catch. Looks like I had moved the explode/trim stuff to hook_webform_submission_load(), and forgot to take it out of _webform_civicrm_webform_frontend_form_alter()
Now fixed.
In regards to your other question, I hope to have a release within the next month or two. It's really getting close, but I'm sadly way too busy in July to work on it much.

colemanw’s picture

That said, it may actually be ready for use on a production site. There are a few new features that don't actually work yet, (namely updating existing activities, and working with cases). But if you don't use those, then you should find everything else to be working just fine (aside from a bug or two which may still be lurking -- you could help me find them)

shoeb_a’s picture

Status: Fixed » Closed (fixed)

Thanks so much for your reply and quick fix. And also thanks for letting me know the status of the development. I may need to use the activity update, but I can handle it from some other place or modify your code to finish off the activity update portion, depending on how important this feature becomes for my project.

I'll go ahead and use the 2.x in my project.

If I find any more issues/bugs, I will post them and try to help you pinpoint the location like here.

Thanks again for your hard work.

colemanw’s picture

OK, I have added the necessary code to support updating activities and handling cases. I also found and fixed a few bugs.
I think we might have a beta on our hands. What do you think?
See #1127888: Working on version 2 for a continuation of this thread.