Score:1

How do I allow users to sort articles by tag with the select field?

uy flag

I have a view page (articles), with a taxonomy term relationship for the tags vocabulary. I have no context filters, and the filter criteria are the following.

  • Published
  • Type: article
  • Taxonomy term (exposed) (with relationship "term", "tid" ID, no multiple choice, operator "one of", but I've also tried "all of" with no use)

At first, the article list on page displays correctly, but when I select tag in select-field and press "apply", I get an error.

InvalidArgumentException: A valid cache entry key is required. Use getAll() to get all table data. in Drupal\views\ViewsData->get() (line 140 of core\modules\views\src\ViewsData.php).

What did I do wrong?

Jaypan avatar
de flag
Welcome to Drupal Answers. If you have not done any custom coding, and this is all through the UI, you have likely found a bug, and are not doing anything wrong. As such, you should search for this error in the Drupal issue queue (https://www.drupal.org/project/issues/drupal) and post a bug report there if you do not find anything.
uy flag
@Jaypan, thanks for the comment. I'm a newbie in Drupal and actually I would with high probability be able to do something wrong. What I want to do - it's so simple and basic, so I'm sure, that I don't understand something. Could you please explain, how to filter with tags? Or share a link with explanation? I searched, but I didn't find what I needed.
Score:1
uy flag

Four hours later I found what was the mistake. I shouldn't use any relationship at all. All I need is the filter criteria "Content: Tags (exposed)" with the default settings.

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.