Skip to content
Snippets Groups Projects
Unverified Commit 713294e9 authored by Alex Pott's avatar Alex Pott
Browse files

Issue #2887490 by michaellenahan, cilefen, rOprOprOp, catch: Activity Tracker...

Issue #2887490 by michaellenahan, cilefen, rOprOprOp, catch: Activity Tracker cannot be enabled if there are unpublished nodes
parent 5e908886
Branches
Tags
2 merge requests!7452Issue #1797438. HTML5 validation is preventing form submit and not fully...,!789Issue #3210310: Adjust Database API to remove deprecated Drupal 9 code in Drupal 10
......@@ -361,8 +361,14 @@ public function testTrackerCronIndexing() {
];
$this->drupalPostForm('comment/reply/node/' . $nodes[3]->id() . '/comment', $comment, t('Save'));
// Start indexing backwards from node 3.
\Drupal::state()->set('tracker.index_nid', 3);
// Create an unpublished node.
$unpublished = $this->drupalCreateNode([
'title' => $this->randomMachineName(8),
'status' => 0,
]);
// Start indexing backwards from node 4.
\Drupal::state()->set('tracker.index_nid', 4);
// Clear the current tracker tables and rebuild them.
db_delete('tracker_node')
......
......@@ -72,7 +72,7 @@ function tracker_cron() {
db_insert('tracker_node')
->fields([
'nid' => $nid,
'published' => $node->isPublished(),
'published' => (int) $node->isPublished(),
'changed' => $changed,
])
->execute();
......@@ -81,7 +81,7 @@ function tracker_cron() {
db_insert('tracker_user')
->fields([
'nid' => $nid,
'published' => $node->isPublished(),
'published' => (int) $node->isPublished(),
'changed' => $changed,
'uid' => $node->getOwnerId(),
])
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment