The call to subscriptions_autosubscribe() function in subscriptions_comment() function needs to be modified.

The passed arguments are: $user->uid, $nid
Such arguments are not found in the whole subscriptions_comment() function!

The attached patch would make the passed arguments as: $comment['uid'], $comment['nid']
Those new arguments are in the scope of subscriptions_comment() function.

Actually, I did such patch when I got the following error when submitting a comment on a blog node that I am autoscribed in:

user warning: Duplicate entry '0-10-node' for key 1 query: INSERT INTO subscriptions (sid , uid, stype, send_interval) VALUES (0 , 10, 'node', 0) in /home/xyz/htdocs/drupal_proj/includes/database.mysql.inc on line 172

CommentFileSizeAuthor
subscriptions_5.x-2.x-dev_module.patch514 bytesogharib

Comments

salvis’s picture

Thank you for the patch.

Please see http://drupal.org/node/187186.

salvis’s picture

Status: Active » Closed (fixed)

Subscriptions 2.0 has been rewritten from the ground up — I'm closing this issue because it refers to obsolete code that was removed.

If you'd like to take a first look and help with testing, then get it from the link on http://drupal.org/project/subscriptions, but do heed the warnings!

Please open new issues for feedback about the new version 2.0!