1

I can't seem to set up a Drupal Webform that creates a Case any more for Anonymous user.

I have a webform that creates a couple of contacts and adds a case. When I use the form as an admin, everything works. But when I test as non-logged-in user, I get an error:

CRM_Core_Exception: source_contact_id is not a valid integer

It seems to be happening late in the process, at the point where the first Activity in the Case is being created. The contacts created by the webform and the Case itself are successfully created, but the Activity is not created.

When the error is thrown the effect is to stop the webform confirmation from appearing and emails don't get sent either.

This is on a Webform that worked with a recent version of CiviCRM (I am not completely sure of version but around a month old). I'm unsure whether this is a new bug or whether there are tighter permissions requirements or something similar? Does anybody have an idea of something else I can try?

I'm on D9/CiviCRM 5.52.2

Edit: This appears to only occur for Cases with Sequences (rather than just Timelines)

1
  • You could try explicitly setting a source_contact_id in here just to see if that works: github.com/civicrm/civicrm-core/blob/…. Webform I think will set the "creator" to contact 1 if none is available, but then for the sequence civi would rely on the default logged in user during the Activity.create call, but I'm not sure what's changed there.
    – Demerit
    Aug 23, 2022 at 3:56

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Browse other questions tagged or ask your own question.