- Issue created by @nodebugger
Blocks rendered in the tab with content that depends on taxonomy terms causes the first cached term to be displayed on all the pages.
Create a block that depends on a specific vocabulary term
Create multiple taxonomy terms from the same vocabulary
Create a tab block
Open the first term correct results is shown
Open the second term cached result for first term is shown
Blocktabs{
...
public function getCacheContexts() {
$contexts = parent::getCacheContexts();
foreach ($this->getTabs() as $tab) {
$contexts = Cache::mergeContexts($tab->getCacheContexts());
}
return $contexts;
}
...
The existing code uses
$contexts = Cache::mergeContexts($tab->getContexts());
Should be changed to
$contexts = Cache::mergeContexts($tab->getCacheContexts());
None
None
None
Active
2.0
Code