Views exposed filter example. README.md file is not up to date.

Created on 1 September 2022, over 2 years ago
Updated 24 November 2023, over 1 year ago

Problem/Motivation

The README shows an example of how to alter a form field to set as an autocomplete_deluxe form element. But i think that is possibly for D7? I have tried the example code (removing bit about adding '_targer_id' as that made no sense) and, although it adds some styling to the element, the controller is never hit and therefore there are no options returned when typing.

Is it possible that the D8 version does not support altering an existing form element?

Steps to reproduce

Proposed resolution

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
  • ➖ Documentation
  • ➖ 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

  • N/A
🐛 Bug report
Status

Needs review

Version

2.0

Component

Code (miscellaneous)

Created by

🇨🇦Canada liquidcms

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.

  • 🇭🇺Hungary suchdavid

    Hi, I think the problem is mainly, that a keyvalue is needed to be saved on the backend possibly for security reasons.

    $key_value_storage = \Drupal::service('keyvalue')->get('entity_autocomplete');
    if (!$key_value_storage->has($selection_settings_key)) {
      $key_value_storage->set($selection_settings_key, $selection_settings);
    }

    And a the url should be generated this way:

    $url = Drupal\core\Url::fromRoute(
      'autocomplete_deluxe.autocomplete',
      $route_parameters,
      ['absolute' => TRUE]
      )->getInternalPath();

    With these modifications it worked for me.

  • Status changed to Needs review over 1 year ago
  • First commit to issue fork.
Production build 0.71.5 2024