Problem/Motivation

We get this issue when we select multiple taxonomies in view filter.

Steps to reproduce

Drupal view term filter only allows you to filter on terms from a single vocabulary. There is a patch to overcome this issue.
Issue link : https://www.drupal.org/project/drupal/issues/2784233
When we apply patch, It change keys from "vid" to "vids". SHS module loading term based on vid.
It throws error for undefined key after applying patch.

Warning: Undefined array key "vid" in Drupal\shs\Plugin\views\filter\ShsTaxonomyIndexTid->valueForm() (line 48 of /usr/local/apache2/htdocs/web/modules/contrib/shs/src/Plugin/views/filter/ShsTaxonomyIndexTid.php)

Proposed resolution

Update the key from "vid" to "vids" and load multiple vocabularies.

CommentFileSizeAuthor
#2 update_key_vid_3383731-2.patch1.35 KBharshit ghediya

Issue fork shs-3383731

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

harshit_ghediya created an issue. See original summary.

harshit ghediya’s picture

Assigned: harshit ghediya » Unassigned
StatusFileSize
new1.35 KB

Updated the key "vid" to "vids" in file "ShsTaxonomyIndexTid.php"

harshit ghediya’s picture

Status: Active » Needs review
xurizaemon’s picture

Status: Needs review » Needs work

This proposed change depends on changes in #2784233: Allow multiple vocabularies in the taxonomy filter which are currently marked for a future Drupal version. Therefore I think this change can't be considered as-is.

To be considered, this issue's patch/MR should either incorporate code to handle both current and future Drupal (vid OR vids), OR update SHS requirements to depend on some future version of Drupal where #2784233: Allow multiple vocabularies in the taxonomy filter has landed (TBC).

Marking "needs work" accordingly.

xurizaemon’s picture

himanshu_jhaloya made their first commit to this issue’s fork.

jacobupal made their first commit to this issue’s fork.

carlos romero made their first commit to this issue’s fork.