I was starting to install nodecomment, but when I prepared to deselect the comment module, I discovered that it is reaquired by tracker.

I like tracker. Is there any way to still use it with nodecomment?

Comments

OwnSourcing’s picture

take a look at this node for your answer: http://drupal.org/node/157433#comment-249445

specifically point #3

greg.harvey’s picture

Unfortunately, Robert is wrong in that thread. =(

See http://drupal.org/node/157433#comment-784788

summit’s picture

Hi, to use nodecomment with tracker I just changed the following code in tracker.module

line 108: if ($new = comment_num_new($node->nid)) {

to

line 108: if ($new = nodecomment_num_new($node->nid)) {

Tracker now works again!
greetings, Martijn

www.trekking-world.com (if you like this info, please make a link to this e-aid website focussed on Nepal).

greg.harvey’s picture

That's brilliant! I'll try it later! =)

Thanks for posting.

greg.harvey’s picture

Status: Active » Needs review
StatusFileSize
new577 bytes
new694 bytes

Yup! Works!

I attach a couple of patches. Should probably be combined, but I made them at separate times and I'm not sure how to safely make them one patch file. The no_dependencies patch updates the tracker.info file to remove the dependency on Comment. The nodecomment_fix patch makes Martijn's change, which works a treat, and should be applied to tracker.module. =)

summit’s picture

Hi,

I do not think tracker will commit these patches, while there are people who use nodecomment, but also people who use comment. So I think the complete patch should be having an if statement in tracker.
If module exists nodecomment {the patch http://drupal.org/files/issues/nodecomment_fix_tracker.module.patch} else the normal tracker rule.
Will you build the patch please?
greetings,
Martijn

greg.harvey’s picture

I suspect the patches will never be committed, PERIOD, since the maintainer obviously only intends for Tracker to work with Comment and has no intention of supporting Node Comment (half supporting it would be silly and cause confusion, so I'd actually support not committing these patches, even though I prefer Node Comment).

But that's ok. The code is here for the people who DO use nodecomment to apply. If you really feel strongly and you want to alter the patch, feel free, but I don't think it's necessary. It's an extra (albeit tiny) piece of logic to process which will never actually be required, IMHO. =)

(It's very tempting to write code for situations that will never occur. I always try and avoid this by looking at everything objectively. In this instance, patches will never be committed to HEAD regardless, so will only ever be applied by people already using Node Comment, therefore extra logic to handle the situation where someone using Comment applies this patch is superfluous.)

sirkitree’s picture

guys, it'd be much easier if you just patch nodecomment.module with the following:

if (!function_exists('comment_num_new')) {
  function comment_num_new($nid) {
    return nodecomment_num_new($nid);
  }
}
summit’s picture

Yes please, much better, no depenencies! please commit. Greetings, Martijn

sirkitree’s picture

Version: 5.x-1.0 » 5.x-1.x-dev
Status: Needs review » Fixed

nodecomment does this a few places already so i don't see why not. Committed to dev.

greg.harvey’s picture

Nice! Much better! Thanks! =)

Anonymous’s picture

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.

yngens’s picture

Status: Fixed » Active

i've taken dependency out and activated tracker module. not sure if #8 was commited or not, but it gives:

Fatal error: Call to undefined function comment_num_new() in /home/mysite/public_html/modules/tracker/tracker.module on line 102

greg.harvey’s picture

Status: Closed (fixed) » Reviewed & tested by the community

You're right. If it was committed to dev, which I guess it was at some point, it's been accidentally uncommitted again. I just reviewed the latest 5.x-1.x-dev code in CVS and it's not there.

sirkitree’s picture

Status: Reviewed & tested by the community » Fixed

Sorry about that guys.

I had accidentally committed D6 stuff to the D5 branch and when I reverted I lost this change.

greg.harvey’s picture

Thanks sirkitree! =)

Anonymous’s picture

Status: Active » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.