If you install the module and visit the admin settings form, the enabled node types will default just to the "Article" node type. This default is provided via comment_notify_variable_registry_get(). If you look where that variable is actually used (variable: comment_notify_node_types), if it's not set, it defaults to all node types; which is good.

So, there are two problems:
1. The admin settings show a default that isn't true. By default, all nodes should be enabled, so all of them should be checked.
2. Not all functions are using comment_notify_variable_registry_get() to fetch variable values (see comment_notify_form_comment_form_alter().

I recommend using the same method of fetching variables across the module, and also changing the default in comment_notify_variable_registry_get() to be all available node types, so the admins are not deceived.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

greggles’s picture

Happy to review a patch.

kscheirer’s picture

Status: Active » Needs review
FileSize
2.66 KB

The attached patch fixes up the variables to all go through comment_notify_variable_registry_get(), good call. I'm not sure about defaulting to all content types though. The settings page should be accurate now, I think just article is a sensible default.

Status: Needs review » Needs work

The last submitted patch, 1892658-2-same-method-all-variables.patch, failed testing.

kscheirer’s picture

Hmm, this passes with flying colors locally - can you point me in the right direction?

hefox’s picture

Issue summary: View changes
Status: Needs work » Needs review
Related issues: +#2073573: Split comment_notify_node_types as entity type specific
FileSize
2.67 KB

Being that currently if not configured, all node types are enabled, changing the patch to reflect that, else likely need to add an update hook/will cause regressions

hefox’s picture

Missing includes

Note module_load_include('inc', 'comment_notify', 'comment_notify'); could likely be simplified to module_load_include('inc', 'comment_notify');

The last submitted patch, 5: 1892658-comment_notify-node_type_default-5.patch, failed testing.