- Issue created by @KiLLAH89
- πΊπΈUnited States awolfey
I'm having this issue also. I'm referencing a node from a group, and using an entity reference field.
- πΊπΈUnited States ccloyd
I had this issue with the 1.4 version. Reverted back to 1.3 and entity references work again. In the 1.4 version it appears to be an issue with the ViewsAutocompleteFiltersController.php file, specifically around line 220 in the autocomplete function.
- π¬π§United Kingdom deranga
Also ran into this issue whereby the update to 1.4 prevents the autocomplete from returning results.
1.3, previously used the style plugin to render the result fields of the executed view, however the new method attempts to load the 'views machine named' field direct from the loaded result entity.
Depending upon your use case, its possible as a workaround to reconfigure the exposed filter to behave in a similar fashion to 1.3, by unchecking either or both the "Unformatted dropdown" or "Unformatted suggestion" options to off. This then triggers the autocomplete to make use of the style plugin to render output as before.
if (!$use_raw_suggestion || !$use_raw_dropdown) { $rendered_field = $style_plugin->getField($index, $field_name); }
-
vasike β
committed 69288848 on 8.x-1.x
Issue #3348802: Fix Autocomplete with entity reference/relationship.
-
vasike β
committed 69288848 on 8.x-1.x
- Status changed to Needs review
over 1 year ago 7:46am 15 September 2023 - π·π΄Romania vasike Ramnicu Valcea
Indeed this "capability" was lost.
There is a new commit that should fix this.
Could we have the confirmation, so we can close this?
Thank you - π©πͺGermany mvogel
@vasike, great work that you found a way to distinguish between the entity and possible entity relationship. I tested it and it works almost 100%
I have found a bug but I think it is a combination of this issue and https://www.drupal.org/project/views_autocomplete_filters/issues/3345680 π Attempt to read property "value" on null in src/Controller/ViewsAutocompleteFiltersController.php on line 220 Needs review
Steps to reproduce:
1. add a plain text field to node article (field_plain_text)
2. add entity reference field to user pointing on node article (field_reference_field)
3. create a node article with a filled field from (1) and update a user field_reference_field to this node
4. create a user entity view with a page
5. add "Relationships" to content from field_reference_field
6. add a field from (1) to "Fields" and add "Filter criteria" with the exposed form and "Use autocomplete"
7. visit the page from (4) and search for the value you created in (3)$real_field_name = $view_field->realField;
$real_field_name = 'field_plain_text_value'
for some reason see screenshotI hope you can reproduce it, it is kinda hard to explain, if you need a video or want a call you can write me
- π·π΄Romania vasike Ramnicu Valcea
@mvogel thanks ... this is not about relationship ... it's about views data ... so good catch ... please check the latest code and the other issue ... where i pushed the commit.
- Status changed to Fixed
about 1 year ago 9:23am 9 October 2023 - π·π΄Romania vasike Ramnicu Valcea
i think we can close this.
please, feel free to re-open, if not done.
Automatically closed - issue fixed for 2 weeks with no activity.
- Status changed to Fixed
about 2 months ago 12:15pm 31 October 2024 - π¬π§United Kingdom mistergroove
Having the same issue with relationship - no values are returned from the callback:
http://myserver/views-autocomplete-filters/protocols/block_method/title/0?q=john
Also I noticed I changed the filter identifier from 'title' to 'author'. Should this also be reflected in the url?
Anyone else still having this issue?