If you change the display of a variation, say by turning the SKU display off, it will not reflect on the product page, even after a refresh. If you change and attribute and trigger the ajax, it will correct itself since the AJAX is not cached.

The problem is the commerce_product_view tag is not invalidated because as far as Drupal is concerned, nothing on the "product" has changed. I am unsure if the variation should be invalidating the cache or if the product should be setting a different cache tag.

Comments

smccabe created an issue. See original summary.

smccabe’s picture

Issue summary: View changes
smccabe’s picture

Issue summary: View changes
Status: Active » Needs review

Ended up fixing it in an entity_type hook, I couldn't figure out a way to have the display config entity track the proper tag itself, so just hook the update with a cache tag invalidate call.

https://github.com/drupalcommerce/commerce/pull/404

smccabe’s picture

Issue summary: View changes
mglaman’s picture

This was discovered in #2742207: Port commerce_product tests to BrowserTest, marking that as parent because it is blocked by this.

  • bojanz committed 538a88c on 8.x-2.x authored by smccabe
    Issue #2748697: Product View doesn't update when Variation Type Display...
bojanz’s picture

Status: Needs review » Fixed

Merged.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.