Early Bird Registration for DrupalCon Portland 2024 is open! Register by 23:59 PST on 31 March 2024, to get $100 off your ticket.
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 CreditAttribution: idebr at iO commentedComment #5
rpayanmComment #6
rpayanmComment #7
hkirsman CreditAttribution: hkirsman commentedWas going to remove the caching myself until saw this - smarter fix :)
Tx!
Comment #8
hkirsman CreditAttribution: hkirsman commentedComment #9
pifagorComment #10
mrinalini9 CreditAttribution: mrinalini9 at Srijan | A Material+ Company for Drupal India Association commentedRerolled patch #5 for 8.x-3.x branch as it failed to apply, please review.
Comment #11
TR CreditAttribution: TR commentedComment #12
mrinalini9 CreditAttribution: mrinalini9 at Srijan | A Material+ Company for Drupal India Association commentedRemoved unused use statement as per mentioned in #11, please review.
Comment #13
TR CreditAttribution: TR commentedLooks good!
Comment #14
pifagorComment #16
pifagorComment #18
a.dmitriiev CreditAttribution: a.dmitriiev as a volunteer and at 1xINTERNET 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 CreditAttribution: a.dmitriiev as a volunteer and at 1xINTERNET 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.