Quantcast
Channel: Issues for Drupal core
Viewing all articles
Browse latest Browse all 296506

taxonomy_tid ViewsArgumentDefault plugin doesn't add cache tags

$
0
0

Problem/Motivation

The taxonomy_tid Views argument default plugin doesn't set any cache tags. And it extends ArgumentDefaultPluginBase, which also doesn't set any cache tags.

But clearly if the plugin is configured to use the node being viewed, the cache tags of said node should be returned by the plugin.

Steps to reproduce

In most cases this won't be noticed because the node_list cache tag tends to be on the View. But using a module like views_custom_cache_tag, I could put a Views block on a Page node that only serves Article nodes and only has the `node_list:article` cache tag. Then if I edit the Page and change the terms that it references and reload the Page, I would see that the View block does not update.

Proposed resolution

Add getCacheTags() method to Drupal\taxonomy\Plugin\views\argument_default\Tid

Remaining tasks

User interface changes

nope

API changes

nope

Data model changes

nope

Release notes snippet

nope


Viewing all articles
Browse latest Browse all 296506

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>