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.
I have configured the default settings for comment notify by ticking all three checkboxes and setting the defaults for both anonymous and authenticated to "All comments".
Then I created a test user, but their comment follow up defaults to "no notifications". Shouldn't thiss be "All comments"?
Comment | File | Size | Author |
---|---|---|---|
#11 | comment_notify_full.patch | 7.46 KB | berenddeboer |
#9 | comment_notify_full.patch | 7.46 KB | berenddeboer |
#6 | comment_notify_defaults.patch | 4.04 KB | berenddeboer |
#3 | 1008938.patch | 611 bytes | codeforkjeff |
Comments
Comment #1
tsvenson CreditAttribution: tsvenson commentedHave just tested this with the latest dev version and it still isn't giving new users the correct default setting. The still get "no notifications" even though "All comments" should be the default value.
Comment #2
omnyx CreditAttribution: omnyx commentedI've been noticing this as well, and while it's a bug, the module is still 'functioning', i.e. no error messages :)
Comment #3
codeforkjeff CreditAttribution: codeforkjeff commentedI'm using the feb 25 dev version. For me, this bug only shows up for anonymous users. Registered users get default settings applied correctly to the form.
Attached is a patch to make the comment form pick up the correct default for anonymous users.
Comment #4
tsvenson CreditAttribution: tsvenson commentedMarked #1008938: New users do not get default state settings as duplicate of this issue.
Comment #5
tsvenson CreditAttribution: tsvenson commented@codeforkjeff: Strange, its the total opposite for me on all sites I use this module on. Anonymous users does get notifications, but new users does not get the default setting corrct resulting in that they don't get any notifications.
Comment #6
berenddeboer CreditAttribution: berenddeboer commentedLots of code missing, so basically doesn't work at all. Here the patch against dev.
Comment #7
berenddeboer CreditAttribution: berenddeboer commentedIf you signup a new user, the node notify will always be false. I think that's wrong, it should be the default setting. Here my proposed patch for comment_notify_form_alter():
Comment #8
tsvenson CreditAttribution: tsvenson commented@berenddeboer Nice one. Do I need to apply both the patch in #6 and the code snippet in #7?
Comment #9
berenddeboer CreditAttribution: berenddeboer commentedYes.
Put some time into combining all my changes into a single patch against dev, hopefully the maintainer can apply this ASAP.
Changes:
1. Properly sanitize comments, so mime mail gets them fine.
2. Properly store notification settings when creating/editing users.
3. For anonymous users, set default node creation to default setting (as they are not created, we can't check if they have permissions to create anything).
Comment #10
Dave ReidWhat's the reason for this change? Using node_access() is the proper way to check this because this will fail on blog content types.
Powered by Dreditor.
Comment #11
berenddeboer CreditAttribution: berenddeboer commentedAh, my mistake. That's because I worked with the 1.0-alpha version (which had that) and bits have been inadvertedly copied over.
Rerolled patch.
Comment #12
gregglesThis no longer applies:
Can you re-roll?
Comment #13
tsvenson CreditAttribution: tsvenson commentedWould be great with a reroll for the latest dev/beta thanks.
Comment #14
gregglesThat's just wrong. It should not have been modified. The most recent patch needs more than a re-roll it needs a fine-review. It has a lot of changes that are not appropriate.
comment_notify_user_insert needs a docblock.
Comment #15
gregglesI think the only problem specific to this issue that was remaining here was fixed in #1234818: comment notifications turned off for new users by default: variable misnamed.