Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
When fetching products and variations the returned data may be incorrect. This can happen when the store context changes, especially in an API environment.
Product and ProductVariation should add the `store` cache context in their returned getCacheContexts values.
Comment | File | Size | Author |
---|---|---|---|
#4 | 3105238-tests-only.patch | 3.26 KB | mglaman |
#4 | 3105238-4.patch | 4.38 KB | mglaman |
| |||
#3 | 3105238-3.patch | 1.12 KB | mglaman |
| |||
#2 | 3105238-2.patch | 1.07 KB | mglaman |
Comments
Comment #2
mglamanThis definitely needs some tests to prove render cache is bypassed on store context. An example is price resolving by store.
Comment #3
mglaman🤦🏼♂️this is already overridden for the variations query param.
Comment #4
mglamanHere's an updated patch with tests.
Comment #5
mglamanComment #7
mglamanComment #8
bojanz CreditAttribution: bojanz at Centarro commentedLooks good!
Comment #9
mglamanTagging two customers involved in this patch.
Comment #11
mglamanCommitted!