Vote::postSave() overrides ContentEntityBase::postSave() without calling the parent method. Because of that, a couple of things that should run don't. Most importantly the list cache tag for votes is not invalidated, so that views e.g. views of votes are not re-calculated when a new vote is created.
| Comment | File | Size | Author |
|---|---|---|---|
| #19 | 2898847-cache-tags-to-invalidate-beta-2-19.patch | 1.8 KB | a.dmitriiev |
| #19 | 2898847-cache-tags-to-invalidate-19.patch | 731 bytes | a.dmitriiev |
| #12 | interdiff-2898847-10-12.txt | 325 bytes | mrinalini9 |
| #12 | 2898847-12.patch | 1.09 KB | mrinalini9 |
| #10 | 2898847-10.patch | 891 bytes | mrinalini9 |
Comments
Comment #2
tstoecklerThis fixes the issue for me, simply by calling the parent function.
Comment #3
duneblI think this patch needs to be rerolled:
Comment #4
idebr commentedComment #5
rpayanmComment #6
rpayanmComment #7
hkirsman commentedWas going to remove the caching myself until saw this - smarter fix :)
Tx!
Comment #8
hkirsman commentedComment #9
pifagorComment #10
mrinalini9 commentedRerolled patch #5 for 8.x-3.x branch as it failed to apply, please review.
Comment #11
tr commentedComment #12
mrinalini9 commentedRemoved unused use statement as per mentioned in #11, please review.
Comment #13
tr commentedLooks good!
Comment #14
pifagorComment #16
pifagorComment #18
a.dmitriiev commentedThanks for the fix, when it will be in the stable version?
I would also like to know why these lines were removed:
Does voted entity already include the vote cache tags? For example, will the page with cache for the node, that I am rating, be updated after the vote is added/updated?
Comment #19
a.dmitriiev commentedMaybe it is good idea to keep those tags in the list of the ones that should be invalidated? I also re-rolled the patch for 8.x-3.0-beta2 because the fix is not in a stable version.