I'm experiencing issues with the rule not executing properly. I have a simple webform, not multi-page, with a rule that once the form is submitted, it queries a response and subscribes to a newsletter. I'm using Webform 7.x-4.2. This used to work, but I'm not sure what update broke it.

I applied the patch at https://www.drupal.org/node/1964590#comment-9143817, even though it was a single page form, but that did not resolve the problem. All other functionalities of the form work.

Any suggestions? What might I be overlooking?

Here's an export of my rule.

{ "rules_daily_tip_subscription" : {
    "LABEL" : "Daily Tip Subscription",
    "PLUGIN" : "reaction rule",
    "OWNER" : "rules",
    "REQUIRES" : [ "webform_rules", "php", "rules", "simplenews_rules" ],
    "ON" : { "webform_rules_submit" : [] },
    "IF" : [
      { "webform_has_id" : {
          "form_id" : [ "form-id" ],
          "selected_webform" : { "value" : { "webform-client-form-3622" : "webform-client-form-3622" } }
        }
      },
      { "AND" : [] },
      { "php_eval" : { "code" : "if ($data[\u0027components\u0027][\u0027subscription_preferences\u0027][\u0027value\u0027][0]==\u0027daily-tips\u0027) {\r\nreturn TRUE;\r\n} else {\r\nreturn FALSE;\r\n}" } }
    ],
    "DO" : [
      { "simplenews_rules_action_subscribe" : {
          "mail" : "\u003C?php print $data[\u0027components\u0027][\u0027civicrm_1_contact_1_email_email\u0027][\u0027value\u0027][0]; ?\u003E",
          "tid" : "82",
          "confirmation" : "0"
        }
      }
    ]
  }
}

Comments

friendswoodtech created an issue. See original summary.

friendswoodtech’s picture

Title: After Form Submitted Rule » After Form Submitted Rule Not Working