Answers.Body: <p>Perhaps work around by using another type of trigger, eg if the webform adds a tag, or adds them to a group</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2023-03-09T18:25:08.133Z
Answers.LastActivityDate: 2023-03-09T18:25:08.133Z
Answers.UserDisplayName: petednz - fuzion
Body: <p>Civicrm version: 5.45.1
  Drupal 9.3.3</p>
  <p>Adding (or editing an existing) civirule where the selected trigger is &quot;webform is submitted&quot; generates the fatal error:</p>
  <blockquote>
  <p>CiviRule trigger class &quot;CRM_WebformCivirules_Trigger&quot; does not exist</p>
  </blockquote>
  <p>excerpt from the Drupal log:</p>
  <blockquote>
  <p>$Fatal Error Details = array:3 [ &quot;message&quot; =&gt; &quot;CiviRule trigger class
  &quot;CRM_WebformCivirules_Trigger&quot; does not exist&quot; &quot;code&quot; =&gt; null
  &quot;exception&quot; =&gt; Exception {#3523 #message: &quot;CiviRule trigger class
  &quot;CRM_WebformCivirules_Trigger&quot; does not exist&quot; #code: 0 #file:
  &quot;/<em><strong>/</strong></em>/public_html/sites/default/files/civicrm/ext/org.civicoop.civirules/CRM/Civirules/BAO/Trigger.php&quot;
  #line: 166 trace: { /<em><strong>/</strong></em>/public_html/sites/default/files/civicrm/ext/org.civicoop.civirules/CRM/Civirules/BAO/Trigger.php:166
  { CRM_Civirules_BAO_Trigger::getTriggerObjectByClassName($className,
  $abort = true) › › throw new Exception('CiviRule trigger class &quot;' .
  $className . '&quot; does not exist'); › } }</p>
  </blockquote>
  <p>Other rules are working fine, only the 'webform is submitted' trigger fails.
  I've not been able to find any information on this error.</p>
  <p>Can anyone help?</p>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2023-03-09T10:03:58.893Z
Comments.Text: Yep, this is what I did. Thanks.
Comments.UserDisplayName: 6jam
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2023-03-09T18:24:55.567Z
Comments.Text: i will add that as an Answer so SE doesn't grumble about Questions not getting answered
Comments.UserDisplayName: petednz - fuzion
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2023-03-09T18:25:38.423Z
Comments.Text: would be good if you +1 and Accept (tick)
Comments.UserDisplayName: petednz - fuzion
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2022-02-03T05:57:01.927Z
Comments.Text: is it possible the 'webform submitted' trigger was built for d7 webforms and you are trying it with d9?
Comments.UserDisplayName: petednz - fuzion
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2022-02-03T06:32:53.513Z
Comments.Text: I've thought this might be the issue, but I don't know how to test or work out if it is.
Comments.UserDisplayName: 6jam
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2022-02-03T18:12:41.317Z
Comments.Text: create the simplest possible webform in both D7 and D9 and compare outcomes?
Comments.UserDisplayName: petednz - fuzion
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2022-02-03T18:13:55.997Z
Comments.Text: then open an Issue via https://lab.civicrm.org/extensions/civirules/-/issues and at least have helped by reporting the error even if you can't fix it
Comments.UserDisplayName: petednz - fuzion
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2022-02-03T23:34:52.543Z
Comments.Text: Thanks. I upgraded my D7 site to D9 (and don't have any other D7 sites), but had been using Civirules with the 'webform submitted' trigger without error for a few years. (However, I only switch on the rules for Feb-Mar). I don't think a simpler webform will help with testing as the error occurs in the civirules UI when moving to the next screen or when saving the rule. I guess setting up a separate D9 site could provide a test
Comments.UserDisplayName: 6jam
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2022-02-04T02:59:16.497Z
Comments.Text: does that mean you can replicate just in civirules eg on https://d9-master.demo.civicrm.org/civicrm/civirule/form/rule?reset=1&action=add - guessing not as i dn't see a trigger for webform probably as webform not enabled.
Comments.UserDisplayName: petednz - fuzion
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2022-02-04T03:00:17.980Z
Comments.Text: if you make a new rule on yours do you see the trigger?
Comments.UserDisplayName: petednz - fuzion
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2022-02-04T03:01:21.433Z
Comments.Text: i tried on a d9 site with webform and get 'no results' if i search in trigger for 'webform'
Comments.UserDisplayName: petednz - fuzion
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2022-02-04T03:02:13.003Z
Comments.Text: can you work around by using another type of trigger, eg if the webform adds a tag, or adds them to a group.
Comments.UserDisplayName: petednz - fuzion
Tags: <webform-civicrm><civirules><drupal-9>
Title: Adding or Editing Civirule where Linked Trigger = "webform is submitted" returns error
ThreadText: # Adding or Editing Civirule where Linked Trigger = "webform is submitted" returns error
  
  (Asked by: username_0 on 2022-02-03)
  
  Civicrm version: 5.45.1
  Drupal 9.3.3
  
  Adding (or editing an existing) civirule where the selected trigger is "webform is submitted" generates the fatal error:
  
  > CiviRule trigger class "CRM\_WebformCivirules\_Trigger" does not exist
  
  excerpt from the Drupal log:
  
  > $Fatal Error Details = array:3 [ "message" => "CiviRule trigger class
  > "CRM\_WebformCivirules\_Trigger" does not exist" "code" => null
  > "exception" => Exception {#3523 #message: "CiviRule trigger class
  > "CRM\_WebformCivirules\_Trigger" does not exist" #code: 0 #file:
  > "/***/***/public\_html/sites/default/files/civicrm/ext/org.civicoop.civirules/CRM/Civirules/BAO/Trigger.php"
  > #line: 166 trace: { /***/***/public\_html/sites/default/files/civicrm/ext/org.civicoop.civirules/CRM/Civirules/BAO/Trigger.php:166
  > { CRM\_Civirules\_BAO\_Trigger::getTriggerObjectByClassName($className,
  > $abort = true) › › throw new Exception('CiviRule trigger class "' .
  > $className . '" does not exist'); › } }
  
  Other rules are working fine, only the 'webform is submitted' trigger fails.
  I've not been able to find any information on this error.
  
  Can anyone help?
  
  **Tags:** webform-civicrm, civirules, drupal-9
  
  > **Comments:**
  > **username_1**: is it possible the 'webform submitted' trigger was built for d7 webforms and you are trying it with d9?  
  > **username_0**: I've thought this might be the issue, but I don't know how to test or work out if it is.  
  > **username_1**: create the simplest possible webform in both D7 and D9 and compare outcomes?  
  > **username_1**: then open an Issue via https://lab.civicrm.org/extensions/civirules/-/issues and at least have helped by reporting the error even if you can't fix it  
  > **username_0**: Thanks. I upgraded my D7 site to D9 (and don't have any other D7 sites), but had been using Civirules with the 'webform submitted' trigger without error for a few years. (However, I only switch on the rules for Feb-Mar). I don't think a simpler webform will help with testing as the error occurs in the civirules UI when moving to the next screen or when saving the rule. I guess setting up a separate D9 site could provide a test  
  > **username_1**: does that mean you can replicate just in civirules eg on https://d9-master.demo.civicrm.org/civicrm/civirule/form/rule?reset=1&action=add - guessing not as i dn't see a trigger for webform probably as webform not enabled.  
  > **username_1**: if you make a new rule on yours do you see the trigger?  
  > **username_1**: i tried on a d9 site with webform and get 'no results' if i search in trigger for 'webform'  
  > **username_1**: can you work around by using another type of trigger, eg if the webform adds a tag, or adds them to a group.  
  > **username_0**: Yep, this is what I did. Thanks.  
  > **username_1**: i will add that as an Answer so SE doesn't grumble about Questions not getting answered  
  > **username_1**: would be good if you +1 and Accept (tick)  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2023-03-09. Score: 1
  
  Perhaps work around by using another type of trigger, eg if the webform adds a tag, or adds them to a group
  
  
  ---
  
  