Closed (cannot reproduce)
Project:
Drupal core
Version:
9.2.x-dev
Component:
views_ui.module
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
25 Sep 2015 at 11:27 UTC
Updated:
7 Apr 2021 at 03:30 UTC
Jump to comment: Most recent, Most recent file

Comments
Comment #2
geaseComment #3
lendudeTrying to reproduce this. The only place I see where I can add a tag to the View is after creation and then choosing 'Edit view name/description' and then adding a tag.
I don't see the error the @gease reported but I do get a javascript error when entering text in the tag field:
TypeError: undefined is not a function (evaluating 'suggestions.indexOf(tagged[i])')Comment #4
lendudeFound the reason for the javascript error I got. Don't know if it solves the original reported error, since I still can't reproduce that.
Ajax bug, so needs manual testing (right?).
Problem was that autocomplete expects a numeric array and views_ui returned an associative array. It would seem that autocomplete.js has a function for dealing with this, well according to the doc block, anyway, because the function doesn't appear to do what it says in the doc block...
But sending a numeric array fixes it.
Comment #5
dawehner.
Comment #6
lendudeAdded a test that tests if a numeric array is returned.
Comment #7
dawehnerThis is not the code style we use
Comment #9
lendudeFixed code style.
Comment #12
dawehnerI'm a bit confused about that. Don't we wether need to adapt it to look something like
, see
\Drupal\block\Controller\CategoryAutocompleteController::autocompleteComment #13
lendudeWell, it worked with just a string, but yeah that format looks much better. Thanks for pointing me in the right direction.
Updated the fix like suggested in #12 and updated the tests to match.
Comment #14
lendudeWith this fixed you run into a new issue, #2579531: Can only see a small number of tags when adding a tag to a view.
Comment #16
timisoreana commentedNew tag can't be added on Add new view page
a) On Add new view page (/structure/views/add) fill "View name" and "Tagged with" fields
b) Save it
Actual result: There are no entities matching %tag%.
Expected result: New view with entered tag is saved.
Comment #17
lendude@timisoreana Ah thank you! Now I get what the original issue is about. It has nothing to do with tagging the View! Updated the issue title and summary to better reflect what this is about and moved my fix to a new issue #2618034: Adding tag to a View gives an error
Comment #18
dawehnerSo need a new patch here ...
Comment #27
quietone commented@gease, Thanks for reporting this issue. We rely on issue reports like this one to resolve bugs and improve Drupal core.
I tested this on 9.2.x and was not able to reproduce this error. I followed the steps given in the Issue Summary and #16. I used devel to generate content with tags. I was able to create a view, using the autocomplete field to select the tag. The update preview in the view correctly listed several node. I was also able to enter multiple tags when creating the view. There were no errors displayed or in the log.
Therefore, closing as cannot reproduce. If you are experiencing this problem reopen the issue, by setting the status to 'Active', and provide complete steps to reproduce the issue (starting from "Install Drupal core").
Thanks!
Comment #28
quietone commentedShould be 9.2.x