- Issue created by @nubeli
- 🇨🇦Canada nubeli
I created a pull request: https://github.com/colemanw/webform_civicrm/pull/865
- 🇮🇳India jitendrapurohit
I'm not able to replicate this on a clean install @nubeli. I think something is wrong with your setup. CiviCRM should be initialized using the CiviCRM Webform Handler plugin. See https://github.com/colemanw/webform_civicrm/blob/6.x/src/Plugin/WebformH...
Can you please confirm if webform_civicrm handler is present (screenshot attached) when you visit - /admin/structure/webform/manage//handlers in the URL?
If not - then the setup seems to be wrong. Is this webform migrated? If yes, the migration code need to create this handler in D9 to function correctly.
- 🇨🇦Canada nubeli
@jitendrapurohit that's not the issue - the CiviCRM handler is on the webform. So I'm not sure where things are wrong. But I figured that it's probably better to ensure that CiviCRM is initialized at that step anyway. Similar patterns are used elsewhere in the module, though inconsistently. For instance in webform_civicrm.module, on Line 141, 876, ... in Utils.php line 566
- 🇨🇦Canada karing 🇨🇦
I can't replicate this either and we have numerous tests that pass on D9/D10. This must be specific to your instance.
- Status changed to Closed: cannot reproduce
over 1 year ago 7:01pm 10 April 2023 - 🇨🇦Canada nubeli
I was able to determine the issue on this particular site. This is not required.
Though aside, I'm wondering why webform_civicrm has
\Drupal::service('civicrm')->initialize();
for some things but not others when the handler itself deals with initializing CiviCRM. Maybe it's not required in those cases either.