Problem/Motivation

The tracker module currently depends on the comment module even if some of it's functions are not related to comments at all (eg. see if a node has been created/updated since our last visit). Sites that does not have comments or that's using another comment module than the core's one (eg. Disqus) cannot use the abilities of Tracker on nodes.

Proposed resolution

Remove comment module dependency and use a condition wherever it's needed to keep existing functionnalities active if the comment module is installed.

Remaining tasks

Contributor tasks needed
Task Novice task? Contributor instructions Complete?
Create a patch Instructions Done
Reroll the patch if it no longer applies. Instructions Done
Update the issue summary Instructions Done
Draft a change record for the API changes Instructions
Improve patch documentation or standards (for just lines changed by the patch) Novice Instructions Done
Update the patch to incorporate feedback from reviews (include an interdiff) Instructions Done
Manually test the patch Novice Instructions
Review patch to ensure that it fixes the issue, stays within scope, is properly documented, and follows coding standards Instructions

User interface changes

Comment module is no longer required to enable tracker module.

API changes

None.

CommentFileSizeAuthor
#130 366511-130.patch29.78 KBsmustgrave
#130 interdiff-126-130.txt2.85 KBsmustgrave
#129 interdiff_128-129.txt5.78 KBnivethasubramaniyan
#129 366511-129.patch29.73 KBnivethasubramaniyan
#128 rerolldiff_126-128.txt20.02 KBasad_ahmed
#128 366511-128.patch29.33 KBasad_ahmed
#126 366511-126.patch29.73 KBsmustgrave
#126 interdiff-124-126.txt6.85 KBsmustgrave
#124 366511-124.patch23.72 KBsmustgrave
#124 interdiff-123-124.txt5.38 KBsmustgrave
#123 interdiff_121-123.txt900 bytesravi.shankar
#123 366511-123.patch22.49 KBravi.shankar
#121 interdiff_113-121.txt1.08 KBravi.shankar
#121 366511-121.patch22.59 KBravi.shankar
#113 interdiff.txt602 bytesandypost
#113 366511-113.patch22.58 KBandypost
#110 interdiff_109-110.txt972 bytesimmaculatexavier
#110 366511-110.patch22.54 KBimmaculatexavier
#109 interdiff_107-109.txt4.05 KBimmaculatexavier
#109 366511-109.patch23.24 KBimmaculatexavier
#107 interdiff_106-107.txt0 bytesimmaculatexavier
#107 366511-107.patch25.09 KBimmaculatexavier
#106 comment-tracker-366511-106.patch36.76 KBanushrikumari
#91 comment-tracker-366511-91.patch37.09 KBduaelfr
#91 comment-tracker-366511-91-tests-only.patch30.19 KBduaelfr
#83 comment-tracker-366511-83-tests-only.patch30.17 KBduaelfr
#83 comment-tracker-366511-83.patch37.08 KBduaelfr
#83 interdiff.366511.82.83.txt11.6 KBduaelfr
#82 interdiff-366511-81-82.txt1.23 KBnaveenvalecha
#82 366511-82.patch51.27 KBnaveenvalecha
#80 interdiff.366511.77.80.txt1.24 KBduaelfr
#80 comment-tracker-366511-80.patch51.12 KBduaelfr
#80 comment-tracker-366511-80-tests-only.patch44.22 KBduaelfr
#74 interdiff.366511.69.74.txt39.16 KBduaelfr
#74 comment-tracker-366511-74--tests-only.patch29.7 KBduaelfr
#74 comment-tracker-366511-74.patch36.6 KBduaelfr
#69 comment-tracker-366511-69-tests-only.patch13.95 KBduaelfr
#69 comment-tracker-366511-69.patch20.85 KBduaelfr
#69 interdiff.366511.68.69.txt11.7 KBduaelfr
#68 interdiff-366511-68.txt758 bytespepegarciag
#68 366511-comment-tracker-68.patch9.15 KBpepegarciag
#63 366511-comment-tracker-62.patch9.17 KBandypost
#63 366511-comment-tracker-62-fail.patch2.38 KBandypost
#62 366511-comment-tracker-61.patch8.94 KBandypost
#62 366511-comment-tracker-61-fail.patch2.01 KBandypost
#60 decouple_comment_module-366511-60.patch6.93 KBduaelfr
#56 interdiff.366511.52.56.txt2.81 KBduaelfr
#56 decouple_comment_module-366511-56.patch7.29 KBduaelfr
#52 interdiff.366511.45.52.txt1.49 KBduaelfr
#52 decouple_comment_module-366511-52.patch6.54 KBduaelfr
#45 decouple_comment_module-366511-45.patch6.52 KBhitesh-jain
#29 366511-29.patch19.67 KBamateescu
#27 366511-27.patch19.64 KBamateescu
#24 366511.patch18.97 KBrobloach
#17 tracker-without-comment-366511-17.patch21.19 KBNephele
#10 366511-2.drupal.tracker-without-comment.patch5.96 KBjoachim
#5 366511.drupal.tracker-without-comment.patch6.18 KBjoachim
#77 interdiff.366511.74.77.txt10.54 KBduaelfr
#77 comment-tracker-366511-77--tests-only.patch44.2 KBduaelfr
#77 comment-tracker-366511-77.patch51.11 KBduaelfr

Comments

robloach’s picture

Title: Disqus & (core) Comment and Tracker » Make Tracker not depend on Comment
Project: Disqus » Drupal core
Version: 5.x-1.3 » 7.x-dev
Component: Miscellaneous » tracker.module
Category: support » feature

The Tracker module requires Comment module to be enabled. Does it really need this dependency?

naheemsays’s picture

Views has a tracker-like view that (probably) can probably (be made to) work without comments enabled?

joachim’s picture

http://drupal.org/project/trackerlite is a clone of tracker but with the comment dependency ripped out.

flaviovs’s picture

+1

Tracker shouldn't depend on comment module, though rather enhance its own functionality if the latter is installed (i.e. when module_exists("comment") returns TRUE).

I've seen so many sites where tracking posts is a highly wanted feature, but post comments aren't needed or desirable.

joachim’s picture

Status: Active » Needs review
StatusFileSize
new6.18 KB

This is so much simpler with the new DB API!

Patch attached.

berdir’s picture

+++ modules/tracker/tracker.pages.inc	10 Nov 2009 20:54:29 -0000
@@ -39,7 +41,17 @@ function tracker_page($account = NULL, $
+    $query->fields('n', array('nid', 'title', 'type', 'changed', 'uid'));
+    if ($comment_module) {
+      $query->join('node_comment_statistics', 'l', 'n.nid = l.nid');
+      $query->fields('l', array('comment_count'));
+    }
+    $query->join('users', 'u', 'n.uid = u.uid');
+    $query->fields('u', array('uid'));    
+    $query->condition('n.nid', array_keys($nodes), 'IN');    
+    $result = $query->execute();

You might be able to use the fluent interface to combine all non-conditional fields/condition calls into one. Something like that (after joins and conditional stuff):
$result = $query
->fields()
->fields()
->condition()
->execute();

Also, IN is the default when an array is passed to condition, so you can ommit that.

+++ modules/tracker/tracker.pages.inc	10 Nov 2009 20:54:29 -0000
@@ -74,7 +88,10 @@ function tracker_page($account = NULL, $
-    '#header' => array(t('Type'), t('Post'), t('Author'), t('Replies'), t('Last updated')),
+    '#header' => 
+      $comment_module ?
+      array(t('Type'), t('Post'), t('Author'), t('Replies'), t('Last updated')) :
+      array(t('Type'), t('Post'), t('Author'), t('Last updated')),

Not sure what our Coding Standard says about this, seems un-common :)

This review is powered by Dreditor.

joachim’s picture

For the conditional in the #header array -- seemed a bit easier on the eye than cutting the array assignment up key by key

What do other people think?

dries’s picture

+++ modules/tracker/tracker.pages.inc	10 Nov 2009 20:54:29 -0000
@@ -11,6 +11,8 @@
+  $comment_module = module_exists('comment');

module_exists() does internal caching (through module_list()) so I'm not sure we need to keep a local variable. Pretty minor though.

joachim’s picture

I figured it saved us 3 or 4 function calls to the same thing -- though the flipside is storing the local variable.
Since I know next to nothing about code optimization, I'll change this when I reroll.

joachim’s picture

Updated patch with changes suggested above.

I've taken the ternary operator out of the array assignment but kept it like this:

  $page['tracker']['#header'] = module_exists('comment') ?
    array(t('Type'), t('Post'), t('Author'), t('Replies'), t('Last updated')) :
    array(t('Type'), t('Post'), t('Author'), t('Last updated'));

Like this the two different versions of the header are on consecutive lines, and so I think it's easier to see how they differ than with an if-else block.

joachim’s picture

Happened to spot these today in modules/node/content_types.inc:

  $field_ui = module_exists('field_ui');

which is later checked in conditionals.

and

  $header = array(t('Name'), array('data' => t('Operations'), 'colspan' => $field_ui ? '4' : '2'));

Should I maybe revert my changes back to the original style for consistency in core?

catch’s picture

If it's not called dozens of times, then there's no real performance impact one way or the other, but assigning a variable can make things more concise if it's used several times, so it's really just a matter of taste here.

robloach’s picture

What if instead of having Tracker check if Comment module's data is available, we make the Comment module add the data to the Tracker page through a hook? Decoupling is a good thing, just not sure of the best way around it.

joachim’s picture

I don't think it would work -- for that to be a clean hierarchically, it would surely entail having comment module do things to tracker's tables, rather than with comment-related hooks in tracker as currently. Which sounds terribly complicated to me.
Also, which other modules would use this? I can't think of any in core. And why would a contrib module support this hook, for one list of stuff, when it can just supply a field to Views module?

This is a small fix I'd like to see get in for 7 -- please let's not creep it! :)

MichaelCole’s picture

catch’s picture

Version: 7.x-dev » 8.x-dev
Nephele’s picture

StatusFileSize
new21.19 KB

@14: Well... so much for Drupal 7 ;) To give this a chance of perhaps making it into Drupal 8, I've updated the last patch to work on HEAD. Assuming that's even the relevant code-base now??

Actually, I started out doing a patch on my own (since I was looking in 7.x instead of 8.x for existing patches), then found this thread and was pleasantly surprised to see that what I'd done was remarkably similar to the existing patch. However, by starting with a fresh look at the code, I was able to identify a few additional changes, so I've merged those into the new patch. In particular, I found a few more places where a check for module_exists('comment') was needed (probably code added to HEAD since the last patch was written). Furthermore, I revamped the tests so that there are tests being done both with and without the comment module.

Is there anything else that needs to be done to get this moving forward again?

joachim’s picture

Status: Needs review » Needs work

Oh cool!

I doubt this would get into 7... though I would contend that depending on comment is *kinda* a bug, given that the module describes itself as:

description = Enables tracking of recent content for users.

;)

joachim’s picture

Status: Needs work » Needs review

Oops, not sure I meant to change the status!

dave reid’s picture

Please try re-uploading the patch. Not sure why it's getting ignored for testing...

EDIT: nevermind, my comment triggered it

Status: Needs review » Needs work

The last submitted patch, tracker-without-comment-366511-17.patch, failed testing.

robloach’s picture

Issue tags: +Platform Initiative

Adding the Platform Initiative tag as this helps decouple some of our sub-systems.

tsvenson’s picture

Title: Decouple Comment module from Tracker » Make Tracker not depend on Comment
Issue tags: -Needs issue summary update, -Framework Initiative +Platform Initiative

Wouldn't mind to see this as part of http://drupal.org/community-initiatives/drupal-core/clean-up. Especially with patch in the works it shouldn't be to much effort to bring this useful improvement into core.

robloach’s picture

Status: Needs work » Needs review
Issue tags: -Platform Initiative +Needs issue summary update, +Framework Initiative
StatusFileSize
new18.97 KB

Re-roll? Like tsvenson mentioned, I'm moving this to the Framework Initiative, as it involves resolving our dependency system.

robloach’s picture

Title: Make Tracker not depend on Comment » Decouple Comment module from Tracker

Status: Needs review » Needs work

The last submitted patch, 366511.patch, failed testing.

amateescu’s picture

Title: Make Tracker not depend on Comment » Decouple Comment module from Tracker
Status: Needs work » Needs review
Issue tags: -Platform Initiative +Needs issue summary update, +Framework Initiative
StatusFileSize
new19.64 KB

Re-rolled again, with passing tests this time. The patch looks good to me but will let someone else to rtbc.

Edit: Improvements to this patch can be done in a sub-branch of http://drupalcode.org/sandbox/sun/1255586.git/shortlog/refs/heads/platfo...

Status: Needs review » Needs work

The last submitted patch, 366511-27.patch, failed testing.

amateescu’s picture

Status: Needs work » Needs review
StatusFileSize
new19.67 KB

Heh, that was silly :) We might not need Comment anymore but we still need Node.

tomkelly’s picture

I added issue summary

robloach’s picture

Issue tags: -Framework Initiative

#29: 366511-29.patch queued for re-testing.

sun’s picture

#29: 366511-29.patch queued for re-testing.

Status: Needs review » Needs work
Issue tags: +Framework Initiative

The last submitted patch, 366511-29.patch, failed testing.

mitchell’s picture

mitchell’s picture

Issue summary: View changes

added issue summary

andypost’s picture

At least we should add dependency on node, because comment no more coupled to node
Also listings probably would be replaced with views #1941830: Convert tracker listings to a view

andypost’s picture

Issue tags: +Needs reroll
hitesh-jain’s picture

Assigned: Unassigned » hitesh-jain
hitesh-jain’s picture

Assigned: hitesh-jain » Unassigned
andypost’s picture

Version: 8.0.x-dev » 8.1.x-dev

Version: 8.1.x-dev » 8.2.x-dev

Drupal 8.1.0-beta1 was released on March 2, 2016, which means new developments and disruptive changes should now be targeted against the 8.2.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

vprocessor’s picture

Assigned: Unassigned » vprocessor
vprocessor’s picture

Assigned: vprocessor » Unassigned
hitesh-jain’s picture

Assigned: Unassigned » hitesh-jain
joachim’s picture

I don't understand this bit of the summary at all:

> Tracker requires an additional comment. By default two comments are added for every entry. Would like to remove the second comment entry.

hitesh-jain’s picture

StatusFileSize
new6.52 KB

Removed comment dependencies from tracker .

hitesh-jain’s picture

Status: Needs work » Needs review

Status: Needs review » Needs work

The last submitted patch, 45: decouple_comment_module-366511-45.patch, failed testing.

hitesh-jain’s picture

Status: Needs work » Needs review

#45:decouple_comment_module-366511-45.patch queued for re-testing.

hitesh-jain’s picture

Assigned: hitesh-jain » Unassigned

Version: 8.2.x-dev » 8.3.x-dev

Drupal 8.2.0-beta1 was released on August 3, 2016, which means new developments and disruptive changes should now be targeted against the 8.3.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

manuel garcia’s picture

Status: Needs review » Needs work
Issue tags: -Needs reroll
  1. +++ b/core/modules/tracker/tracker.pages.inc
    @@ -103,18 +107,19 @@ function tracker_page($account = NULL) {
    +        $row['comments'] = array(
    

    lets use short array syntax

  2. +++ b/core/modules/tracker/tracker.pages.inc
    @@ -103,18 +107,19 @@ function tracker_page($account = NULL) {
    +      $row['last updated'] = array(
    

    lets use short array syntax

  3. +++ b/core/modules/tracker/tracker.pages.inc
    @@ -130,7 +135,7 @@ function tracker_page($account = NULL) {
    +    '#header' => $comment_module ? array(t('Type'), t('Title'), t('Author'), t('Comments'), t('Last updated')) : array(t('Type'), t('Title'), t('Author'), t('Last updated')),
    

    lets use short array syntax

duaelfr’s picture

Issue summary: View changes
Status: Needs work » Needs review
Issue tags: -Needs issue summary update
StatusFileSize
new6.54 KB
new1.49 KB

Is this patch really blocked for monthes just because of the array syntax?

Status: Needs review » Needs work

The last submitted patch, 52: decouple_comment_module-366511-52.patch, failed testing.

duaelfr’s picture

Status: Needs work » Needs review

It looks like a random failure. Retesting.

joachim’s picture

Status: Needs review » Needs work

Enabling Tracker without Comment crashes with this:

Symfony\Component\DependencyInjection\Exception\ServiceNotFoundException: You have requested a non-existent service "comment.statistics". in Drupal\Component\DependencyInjection\Container->get() (line 157 of core/lib/Drupal/Component/DependencyInjection/Container.php).

Drupal::service('comment.statistics') (Line: 297)
_tracker_calculate_changed(Object) (Line: 61)
tracker_cron() (Line: 24)
tracker_install()
call_user_func_array('tracker_install', Array) (Line: 391)
duaelfr’s picture

Status: Needs work » Needs review
StatusFileSize
new7.29 KB
new2.81 KB

That's really strange it does not get triggered by a drush install nor the testbot...
That's fixed anyway.

andypost’s picture

Status: Needs review » Reviewed & tested by the community
Related issues: +#1941830: Convert tracker listings to a view

Looks like should work but makes complicated #1941830: Convert tracker listings to a view

alexpott’s picture

Status: Reviewed & tested by the community » Needs work
Issue tags: +Needs tests

All the tests in the tracker module install comment so atm there's no test coverage. I expect that we need additional test coverage to ensure everything makes sense as comment is both installed on an existing site and also uninstalled.

Version: 8.3.x-dev » 8.4.x-dev

Drupal 8.3.0-alpha1 will be released the week of January 30, 2017, which means new developments and disruptive changes should now be targeted against the 8.4.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

duaelfr’s picture

Issue tags: +seville2017
StatusFileSize
new6.93 KB

This is just a reroll on 8.4.x to start working on tests if someone is tempted

duaelfr’s picture

Issue tags: -seville2017 +DevDaysSeville

Wrong tag, sorry

andypost’s picture

Status: Needs work » Needs review
Issue tags: -Needs tests
StatusFileSize
new2.01 KB
new8.94 KB

Added tests

andypost’s picture

StatusFileSize
new2.38 KB
new9.17 KB

and second route - user's tracker

The last submitted patch, 62: 366511-comment-tracker-61-fail.patch, failed testing.

The last submitted patch, 63: 366511-comment-tracker-62-fail.patch, failed testing.

duaelfr’s picture

Status: Needs review » Reviewed & tested by the community

The latest patch looks good to me, still fixes the issue and add tests asked by @alexpott in #58
Congratulations!

alexpott’s picture

Status: Reviewed & tested by the community » Needs work
+++ b/core/modules/tracker/tracker.module
@@ -93,26 +93,27 @@ function tracker_cron() {
+      if (\Drupal::moduleHandler()->moduleExists('comment')) {

@@ -293,9 +294,11 @@ function _tracker_add($nid, $uid, $changed) {
+  if (\Drupal::hasService('comment.statistics')) {

As far as I can see there's no test coverage of running cron or doing the calculation when comment is not installed.

pepegarciag’s picture

Status: Needs work » Needs review
StatusFileSize
new9.15 KB
new758 bytes

Just a little change to a if condition to meet coding standards.

duaelfr’s picture

StatusFileSize
new11.7 KB
new20.85 KB
new13.95 KB

I cloned \Drupal\tracker\Tests\TrackerTest to make this new test by removing all comment related stuff. That's the best idea I had so I hope it's gonna be good. :/

Status: Needs review » Needs work

The last submitted patch, 69: comment-tracker-366511-69-tests-only.patch, failed testing.

duaelfr’s picture

Status: Needs work » Needs review

Tests are passing.

andypost’s picture

Status: Needs review » Reviewed & tested by the community

Looks it covers lots more, should go now

alexpott’s picture

Status: Reviewed & tested by the community » Needs work
+++ b/core/modules/tracker/src/Tests/TrackerWithoutCommentTest.php
@@ -0,0 +1,296 @@
+class TrackerWithoutCommentTest extends WebTestBase {

There is tonnes of duplication between TrackerWithoutCommentTest and TrackerTest. I think a few things.
1. This test should be called TrackerTest
2. The existing test should be renamed TrackerCommentTest
3. It would be great to reduce duplication. Maybe TrackerCommentTest cound extend TrackerTest and the tests be slightly refactored.

duaelfr’s picture

Status: Needs work » Needs review
StatusFileSize
new39.16 KB
new29.7 KB
new36.6 KB

Let's try a new patch.
I have a failure locally but as I cannot explain it nor reproduce it, I'll let the testbot judge.
*crossing fingers*

The last submitted patch, 74: comment-tracker-366511-74--tests-only.patch, failed testing. View results

The last submitted patch, 74: comment-tracker-366511-74.patch, failed testing. View results

duaelfr’s picture

Reduced code duplication and fixed test fail.

The last submitted patch, 77: comment-tracker-366511-77.patch, failed testing. View results
- codesniffer_fixes.patch Interdiff of automated coding standards fixes only.

The last submitted patch, 77: comment-tracker-366511-77--tests-only.patch, failed testing. View results
- codesniffer_fixes.patch Interdiff of automated coding standards fixes only.

duaelfr’s picture

StatusFileSize
new44.22 KB
new51.12 KB
new1.24 KB

This one is the good one! #confidence

The last submitted patch, 80: comment-tracker-366511-80-tests-only.patch, failed testing. View results
- codesniffer_fixes.patch Interdiff of automated coding standards fixes only.

naveenvalecha’s picture

Thanks for the huge efforts @DuaelFr
I don't see any strong requirement of adding new WTB here. I'm working on another issue where I'm converting last one WTB tracker test to BTB. If this issue will add one more WTB we'll again need the efforts to convert it to BTB. So here is the patch which converted the WTB to BTB. If you have any strong reasons of using WTB please specify.

$ ../vendor/bin/phpunit modules/tracker/tests/src/Functional/TrackerWithoutCommentTest.php 
PHPUnit 4.8.35 by Sebastian Bergmann and contributors.

Testing Drupal\Tests\tracker\Functional\TrackerWithoutCommentTest
.....

Time: 1.51 minutes, Memory: 6.00MB

OK (5 tests, 74 assertions)

//Naveen

duaelfr’s picture

StatusFileSize
new11.6 KB
new37.08 KB
new30.17 KB

Hi @naveenvalecha!
Thanks for your review. I'm sorry but the test you changed wasn't supposed to exist anymore. I merged it into TrackerTest as asked in #73 but, I suppose I forgot to remove it from the codebase :/

Status: Needs review » Needs work

The last submitted patch, 83: comment-tracker-366511-83-tests-only.patch, failed testing. View results

naveenvalecha’s picture

Status: Needs work » Needs review

#83,
Nice
Failures are expected.back to N/R

andypost’s picture

Commiter's feedback #73 addressed

andypost’s picture

Status: Needs review » Reviewed & tested by the community

Tested locally and it works

Version: 8.4.x-dev » 8.5.x-dev

Drupal 8.4.0-alpha1 will be released the week of July 31, 2017, which means new developments and disruptive changes should now be targeted against the 8.5.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

The last submitted patch, 83: comment-tracker-366511-83.patch, failed testing. View results

andypost’s picture

Status: Reviewed & tested by the community » Needs work
Issue tags: +Needs reroll
duaelfr’s picture

Version: 8.5.x-dev » 8.4.x-dev
Status: Needs work » Needs review
Issue tags: -Needs reroll
StatusFileSize
new30.19 KB
new37.09 KB

Rerolled after #2863318: Cache: Convert system functional tests to phpunit has been commited.
Let's hope testbot is happy again then move it back to RTBC and hope it can be commited inside the 8.4 alpha

The last submitted patch, 91: comment-tracker-366511-91-tests-only.patch, failed testing. View results

duaelfr’s picture

Status: Needs review » Reviewed & tested by the community

Testbot is happy
Back to RTBC :)

catch’s picture

Status: Reviewed & tested by the community » Needs review
Issue tags: +Needs product manager review

Why are some hunks checking if comment module exists and others if the service exists?

Also this seems incompatible with #1941830: Convert tracker listings to a view.

I'm struggling a bit to see what's useful in tracker module when comment module isn't installed, that wouldn't be handled simply by creating views at this point.

andypost’s picture

Very interesting point @catch!
the Tracker is not maintainable
- it carry tracker_user & tracker_node tables (easy to convert to field)
- adds listings per user/node (mostly converted to views)
- use dirty hacks to access comment statistics and use them in listings

Makes sense to raise it in #2905741: *DRAFT* Proposed product goals for Drupal 8.5/8.6(+) core

duaelfr’s picture

@catch @andypost Is there something I can do to move this forward?

andypost’s picture

@DuaelFr I really no idea because tracker looks like used only to track commenting on nodes + history module

Maybe we need to open #1255674: [meta] Make core maintainable to decide about unmaintainable tracker module #1261120: Deprecate Tracker module in D10 and move to contrib in D11

joachim’s picture

Tracker is useful for allowing users to find content they have created -- that's why I created the Trackerlite module for sites that didn't have Comment installed.

Version: 8.4.x-dev » 8.5.x-dev

Drupal 8.4.4 was released on January 3, 2018 and is the final full bugfix release for the Drupal 8.4.x series. Drupal 8.4.x will not receive any further development aside from critical and security fixes. Sites should prepare to update to 8.5.0 on March 7, 2018. (Drupal 8.5.0-alpha1 is available for testing.)

Bug reports should be targeted against the 8.5.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.6.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.5.x-dev » 8.6.x-dev

Drupal 8.5.6 was released on August 1, 2018 and is the final bugfix release for the Drupal 8.5.x series. Drupal 8.5.x will not receive any further development aside from security fixes. Sites should prepare to update to 8.6.0 on September 5, 2018. (Drupal 8.6.0-rc1 is available for testing.)

Bug reports should be targeted against the 8.6.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.7.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.6.x-dev » 8.8.x-dev

Drupal 8.6.x will not receive any further development aside from security fixes. Bug reports should be targeted against the 8.8.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.9.x-dev branch. For more information see the Drupal 8 and 9 minor version schedule and the Allowed changes during the Drupal 8 and 9 release cycles.

Version: 8.8.x-dev » 8.9.x-dev

Drupal 8.8.7 was released on June 3, 2020 and is the final full bugfix release for the Drupal 8.8.x series. Drupal 8.8.x will not receive any further development aside from security fixes. Sites should prepare to update to Drupal 8.9.0 or Drupal 9.0.0 for ongoing support.

Bug reports should be targeted against the 8.9.x-dev branch from now on, and new development or disruptive changes should be targeted against the 9.1.x-dev branch. For more information see the Drupal 8 and 9 minor version schedule and the Allowed changes during the Drupal 8 and 9 release cycles.

Version: 8.9.x-dev » 9.2.x-dev

Drupal 8 is end-of-life as of November 17, 2021. There will not be further changes made to Drupal 8. Bugfixes are now made to the 9.3.x and higher branches only. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 9.2.x-dev » 9.3.x-dev
andypost’s picture

Version: 9.3.x-dev » 9.4.x-dev
Status: Needs review » Needs work
Issue tags: +Needs reroll
anushrikumari’s picture

StatusFileSize
new36.76 KB

Re-rolled patch #91 for 9.4.x-dev.

immaculatexavier’s picture

Status: Needs work » Needs review
StatusFileSize
new25.09 KB
new0 bytes

Re-rolled patch against #106 with interdiff

Status: Needs review » Needs work

The last submitted patch, 107: 366511-107.patch, failed testing. View results

immaculatexavier’s picture

Status: Needs work » Needs review
StatusFileSize
new23.24 KB
new4.05 KB

Updated patch against #107 with interdiff

immaculatexavier’s picture

StatusFileSize
new22.54 KB
new972 bytes

Updated patch against #109 with interdiff

Status: Needs review » Needs work

The last submitted patch, 110: 366511-110.patch, failed testing. View results

Version: 9.4.x-dev » 9.5.x-dev

Drupal 9.4.0-alpha1 was released on May 6, 2022, which means new developments and disruptive changes should now be targeted for the 9.5.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

andypost’s picture

Status: Needs work » Needs review
StatusFileSize
new22.58 KB
new602 bytes

Fix missing access call on entity query

Status: Needs review » Needs work

The last submitted patch, 113: 366511-113.patch, failed testing. View results

smustgrave’s picture

Will this be easier or harder if https://www.drupal.org/project/drupal/issues/1941830#comment-14634573 is completed? And since it's being removed in D10 is it worth it?

berdir’s picture

Tracker is not being removed from D10: https://www.drupal.org/docs/core-modules-and-themes/deprecated-and-obsolete. That would be impossible without this issue being resolved first. If comment depends on it, we can't remove tracker.

andypost’s picture

Version: 9.5.x-dev » 10.1.x-dev
smustgrave’s picture

@berdir don't follow. This ticket (if I follow) is trying to get comment out of the tracker module. But don't think the comment module needs tracker.

berdir’s picture

Sorry, misread the issue.

That doesn't change that tracker is AFAIK not being removed from D10. it's still there right now and also not mentioned in this week's D10 meeting about to-be-removed modules?

smustgrave’s picture

So I see it's listed as a recommended removal https://www.drupal.org/docs/core-modules-and-themes/deprecated-and-obsol.... if that's the case should effort be made into this or https://www.drupal.org/project/drupal/issues/1941830#comment-14634573

ravi.shankar’s picture

Issue tags: -Needs reroll
StatusFileSize
new22.59 KB
new1.08 KB

Trying to fix failed tests of patch #113. Removed needs reroll tag as it's not needed anymore.

joachim’s picture

Nitpick:

+++ b/core/modules/tracker/tests/src/Functional/TrackerNodeAccessTest.php
@@ -109,6 +116,23 @@ public function testTrackerNodeAccess() {
+    $service = \Drupal::service('module_installer');

Use $this->container->get() to get a service in tests.

Also, $service isn't a very good variable name! You can just chain it here, as we don't call the uninstaller again.

ravi.shankar’s picture

StatusFileSize
new22.49 KB
new900 bytes

Made changes as per comment #122.

smustgrave’s picture

Status: Needs work » Needs review
StatusFileSize
new5.38 KB
new23.72 KB

Fixed build issue

Status: Needs review » Needs work

The last submitted patch, 124: 366511-124.patch, failed testing. View results

smustgrave’s picture

Status: Needs work » Needs review
StatusFileSize
new6.85 KB
new29.73 KB

Seems the trackerController is broken when comment is uninstalled. Added some checks.

joachim’s picture

Status: Needs review » Needs work
+++ b/core/modules/tracker/src/Controller/TrackerController.php
@@ -68,7 +68,7 @@ class TrackerController extends ControllerBase {
-  public function __construct(Connection $database, Connection $databaseReplica, CommentStatisticsInterface $commentStatistics, DateFormatterInterface $dateFormatter, EntityTypeManagerInterface $entityTypeManager) {
+  public function __construct(Connection $database, Connection $databaseReplica, CommentStatisticsInterface $commentStatistics = NULL, DateFormatterInterface $dateFormatter, EntityTypeManagerInterface $entityTypeManager) {

Optional function params should go at the end.

We can rearrange the method signature, because route controllers are considered internal in the BC policy:

> Core modules contain many route controllers that are bound to individual routes, as well as form classes. These controllers are not part of the API of the module unless specifically marked with an @api tag on the method or class.

Also, I wonder whether it would be over-engineering to provide TWO controller classes for this route, and a Route Provider service which decides which controller to use based on whether comment module is present.

asad_ahmed’s picture

StatusFileSize
new29.33 KB
new20.02 KB

Patch #126 cant apply. so rerolled the patch.Thanks

nivethasubramaniyan’s picture

StatusFileSize
new29.73 KB
new5.78 KB

Fixing Coding Standards

smustgrave’s picture

Status: Needs work » Needs review
StatusFileSize
new2.85 KB
new29.78 KB

Removing credit for #128 and #129. Patch#126 applied to 10.1.x just fine so the followup was not needed.

Addressed the ordering from #127

quietone’s picture

Status: Needs review » Postponed

This extension is deprecated and scheduled for removal in Drupal 11.

This is now Postponed. The status is set according to two policies. The Remove a core extension and move it to a contributed project and the Extensions approved for removal policies.

It will be moved to the contributed extension once the Drupal 11 branch is open.

Version: 10.1.x-dev » 11.x-dev

Drupal core is moving towards using a “main” branch. As an interim step, a new 11.x branch has been opened, as Drupal.org infrastructure cannot currently fully support a branch named main. New developments and disruptive changes should now be targeted for the 11.x branch, which currently accepts only minor-version allowed changes. For more information, see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

andypost’s picture

Project: Drupal core » Activity Tracker
Version: 11.x-dev » 1.0.x-dev
Component: tracker.module » Code
Status: Postponed » Needs work

in contrib now, look it already decoupled enough in 10.3 core

andypost’s picture