Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
I have a CCK multiple values text field. Inside views, added an auto-complete using views autocomplete.
Working as expected in live preview, where as node ids are returned in page display created.
To force usage of defaults, temporarily just kept $view_display = "default";, locally, as a first line in function views_autocomplete_filter, and its working as expected.
I am wondering if this is a bug/expected behaviour/i am doing some thing wrong
Comments
Comment #1
vasikeWhat do you mean by not working. What errors do you have?
Comment #2
vasikeComment #3
ravuriharish CreditAttribution: ravuriharish commentedwhere as node ids are returned in page display created
Comment #4
vasikeunfortunately i can't get it.
can you provide some printscreens with the views settings and views results?
Comment #5
ravuriharish CreditAttribution: ravuriharish commentedAttached screen shot of autocomplete, which is showing up node ids as options.
In the function views_autocomplete_filter($field_name = NULL, $view_name, $view_display, $string = '') if i check for my view name and set to use default view_display, working as expected.
Comment #6
vasikeplease check if there are differences between the default and the pages displays settings.
can you provide also some printscreens with those settings.
Comment #7
Hanno CreditAttribution: Hanno commentedhave the same issue, getting the nid's instead of the titles.
Comment #8
drupalnesia CreditAttribution: drupalnesia commentedMe too, but this happen when I use CCK3 Multigroup.
I can't make autocomplete works for Product Code, my content-type like this:
Sales Order --> contains Product Code (this is a Multigroup field).
Does this module support CCK3 Multigroup field?
Comment #9
rolkos CreditAttribution: rolkos commentedI noticed same issue on D7. When I'm entering some string I'm getting NID in dropdown list. What’s more if field that I'm using use rewrite with tokens and I uncheck "Unformatted" on autocomplete configuration form, it display token name not rewritten value.
If I use plain text in field text on dropdown list is correct but when I select one value in form field Nid is displayed.
Please take a look at attached screenshots.
I'm not sure if its directly related but after I enabled autocomplete module I'm gettigh this warning on view configuration form.
Comment #10
rolkos CreditAttribution: rolkos commentedComment #11
robertom CreditAttribution: robertom commentedSorry for my bad english.
I have same problem of #9... I use field rewrited with token, but rewrite isn't applied.
I will try to deepen this bug a bit
Comment #12
robertom CreditAttribution: robertom commentedComment #13
robertom CreditAttribution: robertom commentedI have an exposed filter with autocomplete on field "Title" and "unformatted dropdown" unchecked. (exposed form in block)
"Title" field use rewrite results capability. Text on rewrite results is: [field_nome_prodotto]
with dev version In the dropdown I receive:
[field_nome_prodotto]
[field_nome_prodotto]
[field_nome_prodotto]
[field_nome_prodotto]
instead of the rewrited value.
For fix this problem I have made the following patch
Comment #14
robertom CreditAttribution: robertom commentedSorry,
I reset this issue as needs works, becouse is needed a rewrite of the following part (included comments)
now I'm on the end of timeline for a project, so currently I don't work on this patch for some days... if someone could test the patch would be awesome
Comment #15
robertom CreditAttribution: robertom commentedforget it..
new patch attached
Comment #16
robertom CreditAttribution: robertom commentedComment #17
robertom CreditAttribution: robertom commentedNew patch that fix also some unwanted "return no results. Please try something else" when $raw_field is an array.
Patch attached
Comment #18
julien.reulos CreditAttribution: julien.reulos commentedNice ! I never managed to get the autocomplete filters work with my views, but with this patch everything is working fine ! No more Ajax errors either.
So, although I do not use tokens nore exposed form in block, I guess the patch is going in the right way.
Thanks.
Comment #19
vasikepatch from #17 commited http://drupalcode.org/project/views_autocomplete_filters.git/commit/20ac440
Thank you all, especially Roberto, thank you Sir.