Skip to content
Snippets Groups Projects

Check node default revision before reindex.

1 unresolved thread
Files
2
@@ -171,9 +171,10 @@ public function postSave(EntityStorageInterface $storage, $update = TRUE) {
\Drupal::service('node.grant_storage')->write($this, $grants, NULL, $update);
}
// Reindex the node when it is updated. The node is automatically indexed
// when it is added, simply by being added to the node table.
if ($update) {
// Reindex the node when it is updated, but only if it iss the default
// revision. The node is automatically indexed when it is added, simply by
// being added to the node table.
if ($update && $this->isDefaultRevision()) {
node_reindex_node_search($this->id());
}
}
Loading