After Drupal 9 upgrade, views contextual filter doesn't work

Created on 6 January 2023, almost 2 years ago
Updated 11 January 2023, almost 2 years ago

I have a contextual filter for a Views block:

Content: Has taxonomy term ID...

Provide default value -- check
Type: Taxonomy Term ID from URL 
Load default filter from term page -- check
Local default filter from node page, that's good for related taxonomy blocks -- check
Filter to items that share all terms -- check

Screenshot of the above settings:

After upgrading to Drupal 9, this filter doesn't work. The page displays all items regardless of whether they are assigned to the same term as the page where this block is located. I have a copy of the site from before I upgraded, and have confirmed that the configuration of the view was the same when the site was on Drupal 8. I have also confirmed that the content items are still assigned to the same term as before. In other words, there is nothing in the configuration or content items that is visibly different from when the site was on Drupal 8, but now the filters do not work.

If I input the term ID in the Preview section of the view, it works. But when I visit a page where the view is displayed, it appears Drupal no longer detects that the container node (page) is assigned to the term.

The site is now on Drupal 9.49. The site was on Drupal 8.92 when the contextual filters last worked as expected.

🐛 Bug report
Status

Postponed: needs info

Version

9.4

Component
Views 

Last updated about 10 hours ago

Created by

🇺🇸United States arnoldbird

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • 🇮🇹Italy robertin0

    Hi,
    I fixed it selecting, in the contextual filters, raw values from url instead of tax id from url.
    it's not a solution but it save my day.
    hope it helps

  • Status changed to Closed: works as designed about 2 months ago
  • 🇳🇿New Zealand quietone

    @robertin0, thanks for reporting back and I am pleased you found a solution.

    However, without steps to reproduce, as asked for a by a maintainer, we can't explore this. Therefor, I am closing this issue.

    If you are experiencing this problem on a supported version of Drupal reopen the issue, by setting the status to 'Active', and provide complete steps to reproduce the issue (starting from "Install Drupal core").

    Thanks!

Production build 0.71.5 2024