Problem/Motivation

Currently, ComponentVariantsHooks::overrideComponentId rewrites the #component key to enforce rendering of a variant if such is present or to instruct the twig loader to render the base component if the __default keyword is present in #variant.

However, the fix that introduced this change didn't account for the rewrite of the #component key and missed corresponding changes in ComponentVariantsHooks::addVariantCacheability and this causes adding of cache tags that are never invalidated.

Steps to reproduce

  • Render a variant in a controller via render element
  • Change the template of the variant and save
  • Check the output on the controller
Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

s_leu created an issue. See original summary.

s_leu’s picture

Status: Active » Needs review
s_leu’s picture

Title: Variant cache tags containing tags which are invalidated » Wrong variant cache tags are added and never invalidated

graber made their first commit to this issue’s fork.

graber’s picture

Status: Needs review » Fixed

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

Status: Fixed » Closed (fixed)

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