Problem/Motivation

The autocomplete results do not respect the filter value provided in the text field, or defined in the view.

Steps to reproduce

  1. Create a view of taxonomy terms
  2. Configure the view to only show terms from a specific vocabulary
  3. Wire up the view to a textfield as described in this module's README.txt
  4. Enter some text in the text field

Expected: Only terms from the configured vocabulary are offered as autocomplete suggestions
Actual: Terms from all vocabularies are offered
Expected: The autocomplete suggestions contain the text entered in the text field
Actual: Suggestions may or may not contain the text

Proposed resolution

ViewsAutoCompleteApiManager::setFilter() needs to be updated to correctly apply filters.

Remaining tasks

None.

User interface changes

None.

API changes

Data model changes

CommentFileSizeAuthor
#2 filters_not_applied-3243888-2.patch822 bytesjoshf

Comments

joshf created an issue. See original summary.

joshf’s picture

Assigned: joshf » Unassigned
Status: Active » Needs review
StatusFileSize
new822 bytes

The attached patch fixes the issue for me.

megha_kundar’s picture

Status: Needs review » Reviewed & tested by the community
trevorbradley’s picture

Yes! This also fixed a long standing issue for me. My view lookup filter was entirely ignored without the patch, works perfectly with it.

vladimiraus’s picture

Status: Reviewed & tested by the community » Fixed

Thank you for your contributions. 🎂
Committed. 🚀

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

  • vladimiraus committed 17ac308f on 2.1.x
    [#3243888] fix: Filters not applied to view results
    
    By: joshf
    By:...

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.