There are some issues with the tracker module when the comment module is not active:

  • When the comment module is not activated, recent posts will not show up in the "recent posts list"
  • Even if you install the comment module later, posts made earlier will not show up in the list.
  • The tracker list shows a column "Replies", even when the comment module is not active.
  • The module counts the posts in another way, resulting in empty pages at the end of the tracker list.

To address these issues I changed some SQL queries and some code in the tracker.module
Please find the attached patch.

Comments

ashtonium’s picture

Status: Needs review » Reviewed & tested by the community

Thanks for this patch! I would never have been able to track this down.

Applied the patch and all my previous tracker entries are now showing up. (tracker had been displaying multiple empty pages before)

+1

serval-1’s picture

Thank you for your feedback. What version of drupal did you patch?

serval-1’s picture

Version: 4.7.3 » 5.x-dev
Status: Reviewed & tested by the community » Needs review
StatusFileSize
new4.87 KB

I created a patch against HEAD for this issue.
I think it would be quite a pity you can't use the tracker without the comment module...

ashtonium’s picture

I had applied the patch to a 4.7.4 site, I'll test against the latest 5.0 beta tonight.

ashtonium’s picture

Status: Needs review » Reviewed & tested by the community

The latest version of the patch applied cleanly and fixed the problem on an install of 5.0 beta2

Tracker entries are now displayed correctly when the comment module is disabled.

RobRoy’s picture

Status: Reviewed & tested by the community » Needs work

I don't know about that COALESCE in there. I think we should deal with any NULL values (if those aren't set to not null, I didn't look) on the PHP side and leave the SQL as simple as possible.

serval-1’s picture

Status: Needs work » Needs review

Dealing with the NULL values in PHP will be quite difficult. The sort order depends on the columns l.last_comment_timestamp, which can be NULL, and n.changed.

The COALESCE function is not quite common, but it is ANSI SQL. It returns the first Non-NULL field.

allie micka’s picture

StatusFileSize
new5.01 KB

Reviewed at TC Drupal Bug Hunt

We have re-rolled this patch against HEAD. We also modified the behavior for users with no access to "access comments" permission: When the comment module is not enabled, or the user does not have access, the "replies" column does not appear.

serval-1’s picture

All of a sudden I tend to like those Drupal group bug hunts ;)
Thank you for reviewing. Your addition about comment access makes great sense!

BTW: COALESCE is also supported by MS SQL: http://msdn2.microsoft.com/en-us/library/ms190349.aspx#

Steven’s picture

Status: Needs review » Postponed (maintainer needs more info)

I think this was fixed in another issue, either in whole or partially. Needs to be verified.

ashtonium’s picture

Status: Postponed (maintainer needs more info) » Needs review

Not fixed yet. The original issue is still present in Drupal 5.0 RC1

to see the issue: disable the comment module & create a node. Your tracker page will not show any entries created while the comment module has been disabled (any tracker entries created while the comment module was enabled will still be displayed).

Enabling the content module again does now re-display the previously hidden tracker entries, but this is not a fix in my opinion.

The latest patch from comment #9 applied successfully against 5.0 RC1, and completely fixes the issue from my testing.

RTBC ?

serval-1’s picture

@Steven: Are you reffering to #102353? As pointed out by ashtonium, the patch over there only solves this issue partially. The tracker is still disfunctional when the comment module is disabled.

I confirm the patch in #9 still works. Essentially, this patch makes the tracker independent from the node_comment_statistics table content. Additionally the patch hides the comments column in the tracker when not appropriate.

drumm’s picture

Status: Needs review » Needs work

patching file modules/tracker/tracker.module
Hunk #1 FAILED at 78.
Hunk #2 FAILED at 119.
2 out of 2 hunks FAILED -- saving rejects to file modules/tracker/tracker.module.rej

joachim’s picture

I'm seeing this problem in Drupal 5.1.
Subscribing.

dpearcefl’s picture

Status: Needs work » Closed (won't fix)

Considering the age of this issue with no responses and that D5 is unsupported, I am closing this issue.