I made a webform, which has a yes/no question about subscription.
After it, I created a rule to subscribe the user to a newsletter. But it throws an Integrity Constraint error.
After some inspection a realized that the functions wants 'tid' array key, but the form returns 'newsletter_id' key.
So I changed the form field key:
simplenews/simplenews_rules/simplenews_rules.rules.inc line 37
- 'newsletter_id' => array(
+ 'tid' => array(
| Comment | File | Size | Author |
|---|---|---|---|
| #3 | simplenews-fix_simplenews_rules-1959790-3.patch | 3.01 KB | PascalAnimateur |
| #2 | simplenews-fix_simplenews_rules-1959790-2.patch | 1.92 KB | PascalAnimateur |
Comments
Comment #1
tchopshop commentedTHANK YOU!
Comment #2
PascalAnimateur commentedI fixed the problem the other way around: by renaming 'tid' to 'newsletter_id' everywhere else :)
Here's a patch...
Comment #3
PascalAnimateur commentedBetter patch that also fixes rules actions for unsubscribe / subscription_delete.