The contextual filter doesn't work in Drupal 10.1.8

Created on 31 August 2024, 28 days ago

Problem/Motivation

similarterms/src/Plugin/views/argument/SimilarTermsArgument.php::validateArgument() returns FALSE, which causes no results in the view filtered by the contextual filter "Similar by terms: Nid".

Steps to reproduce

Create a view and add a contextual fitler "Similar by terms: Nid". Do not select any vocabularies in the field "Limit similarity to terms within these vocabularies".

πŸ› Bug report
Status

Needs review

Version

1.9

Component

Code

Created by

πŸ‡ΊπŸ‡¦Ukraine max-kuzomko

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

Comments & Activities

  • Issue created by @max-kuzomko
  • Issue was unassigned.
  • Status changed to Needs review 28 days ago
  • πŸ‡ΊπŸ‡¦Ukraine max-kuzomko

    The issue happens because the condition if ($val === 0) doesn't work when the $val is actually a string '0'. Added a fix.

Production build 0.71.5 2024