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.
From my work on http://drupal.org/node/102353 I found this:
Repeatable: always
Steps to repeat:
1. create content
2. comment on content
3. enable tracker
4. visit tracker and look at the number of replies on each post and last update
5. disable comment module
6. re-visit tracker
Expected results:
Number of replies and time of last update stay the same and only default to 0 and node last update time if node_comment_statistics is null for a particular node.
Actual results:
Replies goes to zero and "last update" goes to node->changed
Comment | File | Size | Author |
---|---|---|---|
#3 | 102766_0.diff | 981 bytes | greggles |
#1 | 102766.diff | 732 bytes | greggles |
Comments
Comment #1
gregglesLooking back through CVS it seems that a "module_exists('comment') was added in revision 1.86 to prevent a comment specific function from being called. Since we no longer call that comment functon we can remove that check for module exists. The original issue was http://drupal.org/node/9031
Attached is a patch which fixes this.
To test:
1. Create some content
2. Add some comments
3. Visit the tracker page and notice the number of comments on each post
4. Disable comment.module
5. Visit the tracker page and note the "0" for number of replies on all posts
Attached (extremely simple) patch removes the check for comment module.
Comment #2
Steven CreditAttribution: Steven commentedWe still call comment_num_new() as far as I can see. The other/older issue with tracker.module and comment.module (and missing node_comment_statistics lines) has been fixed, so this patch needs to be revisited and commented more clearly.
Comment #3
gregglesThanks for the review. I've updated the patch with your suggestions.
If the comment is still lacking please let me know what you would like to see in it.
Comment #4
drummI think the Replies column should be removed if the comment module is disabled. Any number of replies would be inaccurate since you can't view any of them.
Comment #5
tstoecklerIn both Drupal 6 and Drupal 7 Tracker module depends on Comment module.