Problem/Motivation
The README shows how to turn a views exposed filter into an Autocomplete Deluxe element, but the example was written against an older API. It adds the styling and the element renders, while the autocomplete route is never reached, so nothing is suggested. The example also carries a typo, auto_crteate_bundle, and a line that is not needed.
Steps to reproduce
- Add a taxonomy filter to a view and expose it.
- Follow the README example in a custom module.
- The field looks right and no suggestion comes back.
Proposed resolution
Rewrite the example against the current code, and document the same wiring for a form of your own. The part that matters is that the selection settings have to be in the entity_autocomplete key value store under their hash before the route is called.

Remaining tasks
- ✅ File an issue
- ✅ Addition/Change/Update/Fix
- ✅ Testing to ensure no regression
- ➖ Automated unit testing coverage
- ➖ Automated functional testing coverage
- ➖ UX/UI designer responsibilities
- ✅ Readability
- ➖ Accessibility
- ➖ Performance
- ➖ Security
- ✅ Developer Documentation
- ➖ User Guide Documentation
- ➖ Reviewed by human
- ➖ Code review by maintainers
- ➖ Full testing and approval
- ➖ Credit contributors
- ➖ Review with the product owner
- ➖ Release notes snippet
- ❌ Release
User interface changes
- N/A
API changes
- N/A
Data model changes
- N/A
Release notes snippet
- The README examples for a views exposed filter and for a form of your own are up to date.
| Comment | File | Size | Author |
|---|---|---|---|
| #10 | 3307367-views-exposed-filter.png | 57.44 KB | rajab natshah |
| #5 | autocomplete_deluxe-update_readme-3307367-5.patch | 855 bytes | suchdavid |
Issue fork autocomplete_deluxe-3307367
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
Comment #2
rajab natshahThank you, Peter, for reporting.
Indeed it is out of date.
Please, advise and help with that.
Do you suggest any changes?
Anyone can do a basic ( Create Issue fork for this ) and use the Web IDE from Gitlab.
Changes are welcomed and they will be committed :)
Comment #3
rajab natshahComment #4
rajab natshahComment #5
suchdavid commentedHi, I think the problem is mainly, that a keyvalue is needed to be saved on the backend possibly for security reasons.
And a the url should be generated this way:
With these modifications it worked for me.
Comment #6
suchdavid commentedComment #8
proteo commentedAs of Drupal 11.1.7 and Autocomplete Deluxe 2.1.2, the previous code no longer works. Here is an updated version that is working for me. I can create a patch for the readme file if the maintainer is interested:
Comment #10
rajab natshahThank you, David for tracing it to the key value store, Nishant for the first commit on the fork, and Proteo for the working code.
Built both examples in a scratch module on Drupal 11.4 and ran them.
A form of my own: the element renders, the suggestion list comes back from the controller, a tag is added and the form submits. It also showed the undefined array key warning for #cardinality, which is #3501341: Fix Warning: Undefined array key cardinality and has a merge request of its own.
A view with an exposed taxonomy filter: the element replaces the filter, suggestions come back, and applying the filter with Drupal (7) returns exactly the three nodes tagged with that term.
The merge request rewrites the FAQ with both examples, drops the dead auto_create_bundle line and its typo, and builds the route through the URL generator.
To review, test, then merge.
Comment #12
rajab natshahComment #14
rajab natshah