Download & Extend

Use user/autocomplete instead of views own autocomplete function

Project:Drupal core
Version:8.x-dev
Component:views.module
Category:task
Priority:normal
Assigned:Unassigned
Status:closed (fixed)
Issue tags:VDC

Issue Summary

Views had it's own handling of autocompletion for user, though since #1817656: Let user_autocomplete also find the anonymous user. that's not needed anymore.

Comments

#1

Status:active» needs review

Yeah!

AttachmentSizeStatusTest resultOperations
drupal-1892836-1.patch4.74 KBIdleFAILED: [[SimpleTest]]: [MySQL] Setup environment: Test cancelled by admin prior to completion.View details

#2

New version.

AttachmentSizeStatusTest resultOperations
drupal-1892836-2.patch4.75 KBIdlePASSED: [[SimpleTest]]: [MySQL] 50,671 pass(es).View details

#3

Status:needs review» reviewed & tested by the community

That is a great diff!

#4

Status:reviewed & tested by the community» needs work

+++ b/core/modules/user/lib/Drupal/user/Plugin/views/filter/Name.php
@@ -45,7 +45,7 @@ function value_form(&$form, &$form_state) {
+      '#autocomplete_path' => 'user/autocomplete?anonymous=1',

Autocomplete path does not seem to work with that query part.

+++ b/core/modules/views/includes/ajax.inc
@@ -279,53 +279,6 @@ function views_ajax_form_wrapper($form_id, &$form_state) {
-  // The user enters a comma-separated list of user name. We only autocomplete the last name.

I think user/autocomplete does not support that. Am I missing something?

#5

Mh damnit, you are probably right in both cases ... we will have to figure them out.

#6

Status:needs work» needs review

Couldn't resist a re-roll now #1817656: Let user_autocomplete also find the anonymous user. is done in a way that'll work!

But considering #2 actually passed maybe we need a test?

AttachmentSizeStatusTest resultOperations
1892836.6.patch4.75 KBIdlePASSED: [[SimpleTest]]: [MySQL] 49,394 pass(es).View details

#7

Status:needs review» reviewed & tested by the community

RTBC in case it comes back green.

#8

Status:reviewed & tested by the community» fixed

Rock, thanks!

Committed and pushed to 8.x. Thanks!

#9

Status:fixed» closed (fixed)

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