- Issue created by @mvogel
- Status changed to Needs review
about 1 year ago 7:23am 13 October 2023 - Status changed to RTBC
about 1 year ago 11:01am 13 October 2023 - Status changed to Needs work
about 1 year ago 3:36pm 17 October 2023 - 🇷🇴Romania vasike Ramnicu Valcea
sorry guys, but thanks
This can't considered as bug report, as this too specific to a module, so i would say it's a feature request.
Also this means it should be for the next D10 version (first).Also there was an update https://www.drupal.org/project/views_autocomplete_filters/issues/3394657 🐛 Not working for filters for elements/columns of Compound Fields - Attempt to read property "value" on null Active which probably "messed around" your patch.
Is there another "similar" case where this patch could "save the day"?
Also do you have any thoughts or suggestions, about a need of hook or something that could easily fix such custom cases?
As it is hard to solve all contrib cases.Just saying ....
Thanks again for all efforts and support. - 🇩🇪Germany mvogel
You are right. Inversion of control should be the approach here. I will think about it and make a proposal later.
- Merge request !8Issue #3393550 by mvogel: Create autocomplete value alter hook → (Open) created by mvogel
- 🇩🇪Germany mvogel
I created a merge request.
I defined an alter hook to change the value for the autocomplete result. The will run after the default code so contrib or custom modules can change it.
I made the original code null save by adding?->
$raw_field = $entity->$real_field_name?->value;
Because otherwise, it will generate watchdog entries for the 'realname' fields.
I don't know if this adds too much complexity, and if it is a straightforward approach, I tried to document as much as possible and give the hook as much context as someone may need.
- Status changed to Needs review
about 1 year ago 8:02am 19 October 2023 - Status changed to Needs work
10 months ago 12:55pm 10 March 2024 - 🇷🇴Romania vasike Ramnicu Valcea
Thread on MR + conflicts with the latest updates.
+ update the issue title to cover the solution needed.