Question

I'm working on customizing some templates on an existing Drupal 8 site. I was about to start working on the taxonomy term page but noticed only a single content is showing in it. I already checked and there are several contents associated with the taxonomy I'm testing.

It's not the pager settings, which could be limiting the results to 1. Neither the filter apparently, I've disabled all filter and sort criteria.

Another thing I tried was clearing the cache. I even disabled the cache for this view, completely.

Finally, it seems the theme has no custom hook that could be changing this view in some way.

Here are the settings I currently have for this view:

View settings

What else could I check in order to show the correct results?

Was it helpful?

Solution

After following @ShawnConn's advice on enabling the Show the SQL query option, I figured out what happened.

The query was indeed returning only one result. But then I remembered the categories were recently changed right on the database. To do that, we've updated the respective field table -- node__field_categories in our case. However, the taxonomy_index table was not updated. I went ahead and manually (again, I know) updated the taxonomy_index table and now the view is showing the expected content. I hope this is the last and only side effect.

The lesson learned is: only touch the database if you really know what you're doing. And even then, think twice. :P

Licensed under: CC-BY-SA with attribution
Not affiliated with drupal.stackexchange
scroll top