diff --git a/src/Entity/Vote.php b/src/Entity/Vote.php index 042104d..d712d90 100644 --- a/src/Entity/Vote.php +++ b/src/Entity/Vote.php @@ -256,6 +256,8 @@ class Vote extends ContentEntityBase implements VoteInterface { * {@inheritdoc} */ public function postSave(EntityStorageInterface $storage, $update = TRUE) { + parent::postSave($storage, $update); + if (\Drupal::config('votingapi.settings')->get('calculation_schedule') == 'immediate') { // Update voting results when a new vote is cast. \Drupal::service('plugin.manager.votingapi.resultfunction') @@ -264,8 +266,6 @@ class Vote extends ContentEntityBase implements VoteInterface { $this->getVotedEntityId(), $this->bundle() ); - $cache_tag = $this->getVotedEntityType() . ':' . $this->getVotedEntityId(); - Cache::invalidateTags([$cache_tag]); } }