"Name" (Title) filters are not limited to current bundle

Created on 25 February 2022, over 2 years ago
Updated 4 October 2024, about 2 months ago

Problem/Motivation

bef_select does not respect the current bundle when generating the result set of items to show in the select box. All entries that match the field are shown, regardless of whether they are in the selected bundle for the view used. This is readily apparent when using bef_select to show a list of Names (titles of taxonomy terms), as the list of Names includes all vocabularies, not just the vocabulary which has been selected for the view.

Steps to reproduce

  1. Create two vocabularies and populate both with some entries.
  2. Create a view to show entries of only one vocabulary. Verify only those entries are shown.
  3. Create a filter for "Name" and expose it using the default filter. Verify that only entries of the specified vocabulary are shown.
  4. Alter the filter to use "bef_select". Verify that entries for all vocabularies are shown.

Current outcome

When using bef_select, all items with an entry for the selected field are shown, regardless of bundle

Expected outcome

bef_select should honor the current bundle as shown in the view, as do other filters

Proposed resolution

Add a query condition that limits the result set to the bundle specified in the view.

Remaining tasks

Test and commit

User interface changes

None

API changes

None

Data model changes

None

Notes

The patch attached is limited to apply only to the "Name" (title) field, but likely this is useful for any shared field.

πŸ› Bug report
Status

Active

Version

1.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States josephcheek Provo, UT

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.

Production build 0.71.5 2024