// And then we push the out the new changed timestamp to our denormalized
      // tables.
      db_update('tracker_node')
        ->fields(array(
          'changed' => $changed,
          'published' => $node->status,
        ))
        ->condition('nid', $nid)
        ->execute();
      db_update('tracker_node')
        ->fields(array(
          'changed' => $changed,
          'published' => $node->status,
        ))
        ->condition('nid', $nid)
        ->execute();
    }
  }

There appears to be a redundant db_update in _tracker_remove. The second one supposed to apply to tracker_user if the module follows the same structure at the D6 verison. If this is not the case the second db_update probably should be eliminated as unnecessary. This should also be backported to D7.

I have no way of testing this on D8 (not yet familliar enough with D8).

CommentFileSizeAuthor
#2 tracker.module.patch518 bytesletapjar
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

letapjar’s picture

Checking the code from the D6 module Tracker 2 it appears as if the second db_update is infact supposed to be for tracker_user.

letapjar’s picture

Title: Redundant db_upate in _tracker_remove ? » _tracker_remove does not properly update tracker_user and has a redundant db_update for tracker_node
Issue summary: View changes
Status: Active » Needs review
FileSize
518 bytes
dawehner’s picture

Status: Needs review » Needs work
Issue tags: +Needs tests

The patch itself looks pretty great.

Let's better adds some tests.

letapjar’s picture

I'm not sure how to do that as I'm not 100% familliar w/. what Tracker

Version: 8.0-alpha8 » 8.x-dev

Core issues are now filed against the dev versions where changes will be made. Document the specific release you are using in your issue comment. More information about choosing a version.

tim.plunkett’s picture

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

This is still a problem.

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