Hi All,
I've created a custom subscription 'all' to react on a 'Node' type events for 3 different node types.
When user clicks to subscribe to 'all' the module tries to enter duplicate values to notifications_fields table. Error message is below:
--
user warning: Duplicate entry '11-type' for key 1 query: INSERT INTO notifications_fields (sid, field, value, intval) VALUES(11, 'type', 'articles', 0) in /var/www/XXXXXX/sites/all/modules/notifications/includes/notifications_subscription.class.inc on line 422.
user warning: Duplicate entry '11-type' for key 1 query: INSERT INTO notifications_fields (sid, field, value, intval) VALUES(11, 'type', 'news', 0) in /var/www/XXXXXX/sites/all/modules/notifications/includes/notifications_subscription.class.inc on line 422.
--
Is it a bug or I just misuse the custom subscriptions module?
Comments
Comment #1
chirale CreditAttribution: chirale commentedSame issue here using multiple Custom Subscriptions (on registration) via taxonomy.
Comment #2
bochen87 CreditAttribution: bochen87 commentedsame issue here.
The problem is also if this happens, somehow the notifications stop working. I have to uninstall the messaging and notification module to make it work again.
The problem is, that the primary key in notifications_fields consists of "sid" and "field". This will not be unique if you have more than one content type inside it.
But I still dont know why it completely stops working after that.
Comment #3
ethnovode CreditAttribution: ethnovode commentedSame problem if I have 2 or more taxonomy terms in the subscription. No problem if I have 1 taxonomy term and 1 content type.
The warning shows when saving the second taxonomy term or when I assign the subscription that has 2 taxonomy terms to a user (and the subscription is not sending any emails).