Closed (fixed)
Project:
Commerce Core
Version:
8.x-2.x-dev
Component:
Product
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
6 Jun 2017 at 13:23 UTC
Updated:
22 Jun 2018 at 14:44 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
luksakComment #3
bradjones1So in my testing the issue seems to be that the render array's cache metadata does not include the 'v' query string key, and so the fields relating to the current product variation from the context are cached regardless of that value. This patch adds the cache context to the build array.
Not sure if test coverage in Commerce exists/needs to change to cover this?
Comment #4
mglamanThat is the correct approach. I thought there was an open issue for this already. Good patch. We can write tests for it ensure cache busting.
Comment #5
bojanz commentedLet's add a test and wrap this up.
Comment #6
mglamanActually, I'm pretty sure we can define this on the product class itself.
Comment #7
mglamanThis doesn't add tests, but it puts the cache context on the product entity so it is always available and bubbles up.
Comment #9
bojanz commentedCommitted #7 since it's release day, renaming the issue so that it receives the test.
Comment #10
bojanz commentedReverting the title, having a test for this one-liner no longer feels like good use of our time.