Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
You should think about few general changes in your module. Altering of the 'comments' table is a very dangerous solution. You should create your own database table with nid, uid and email fields. The second thing is the sending of emails. In my opinion, it should be processed by cron. Consider my advices please.
Comment | File | Size | Author |
---|---|---|---|
#4 | 232564_comment_notify_refactor_for_own_table_and_postgres_4.patch | 11.03 KB | greggles |
#3 | 232564_comment_notify_refactor_for_own_table_and_postgres.patch | 10.94 KB | greggles |
Comments
Comment #1
gregglesI'm renaming this to a more descriptive title that contains just one problem. Please create a new issue regarding sending mail on cron.
Also, while I generally agree with the sentiment that core tables should not be modified I don't plan to fix this directly but instead have some ideas on other ways to change the module to handle your advice.
Comment #2
gregglesOne more thought about this...currently the module uses some database specific concat/md5 functions to create a hash for unsubscribing users. If this were in its own table then it could have four columns:
cid|notification_hash|active
That way we can create the hash in php and create the link and the unsubscribe function in a more database agnostic manner (and probably a faster manner, since it is only calculated once).
Comment #3
gregglesHere is a patch which attempts to do this. I'd love your help in reviewing/testing.
Comment #4
gregglesMinus the debug statements...
Comment #5
gregglesThis is now fixed - http://drupal.org/cvs?commit=130452
Comment #6
Anonymous (not verified) CreditAttribution: Anonymous commentedAutomatically closed -- issue fixed for two weeks with no activity.