1.0 Problem/Motivation

In some cases viewing results of a CiviCRM webform leads to this error due to CiviCRM not being initialized yet.

2.0 Detailed steps to reproduce (embed screenshots)

Create a Webform with CivICRM processing enabled, submit it and try to view results. I'm not sure about the specific scenario and don't have the time to investigate as the Webform this appears on is quite large.

3.0 Proposed resolution

In \_fillCiviCRMData() there should be a \Drupal::service('civicrm')->initialize();, which makes sure we have our global functions available. Re-initializing does not hurt as it early-returns in that case.

See Pull Request in the GitHub repo.

Comments

jensschuppe created an issue. See original summary.

jensschuppe’s picture

Issue summary: View changes
jensschuppe’s picture

Assigned: jensschuppe » Unassigned
Status: Active » Needs review
jensschuppe’s picture

Issue summary: View changes
jitendrapurohit’s picture

Status: Needs review » Fixed

PR is merged.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.