- Issue created by @geoffreyr
- 🇦🇺Australia mingsong 🇦🇺
Thanks @Geoffrey for the suggestion.
I am not sure if I fully understand the requirement. I link some relevant resource for everyone who interested in this feature, as the background of this discussion.
- Added configurable match limit to the entity autocomplete matcher →
- Hardcoded result size limit in the entity reference autocomplete widget. →
- How to display more than 10 items in link widget autocomplete?
Please feel free to correct me if the resources above is irrelevant or out of date.
I think it is a big issue for using Drupal as a big data (content) management system.
- 🇦🇺Australia geoffreyr
@Mingsong No worries, happy to shed some light on the intricacies of this issue. It's not really about the number of matches returned to the autocomplete; it's about the autocomplete text input field itself being hard limited to 1024 chars long. Here's a discussion covering some one-off fixes for the issue. Since EntityReferenceTreeWidget is a child class of EntityReferenceAutocompleteWidget, we'd be overriding the limitation present in EntityReferenceAutocompleteWidget::formElement.
Instead of doing a one-off fix, we figured making the widget more flexible would be a better solution. A patch to the widget would be a good start, and I'm currently working on this.
- Merge request !113456598: Allow autocomplete field to be extended to any length beyond 1024 → (Merged) created by geoffreyr
- 🇦🇺Australia mingsong 🇦🇺
Thanks @Geoffrey for the MR.
Just one minor issue with it, which caused the PHPUnit test failed.
I corrected the data type for 'autocomplete_maxlength', then all tests passed.
- Status changed to Needs review
5 months ago 5:01am 24 June 2024 - 🇦🇺Australia mingsong 🇦🇺
I changed it to 'Needs review'. Hope any others can test and review this for us.
Any feedback and thoughts are welcome.
- 🇦🇺Australia mingsong 🇦🇺
The patch for the MR can download from
https://git.drupalcode.org/project/entity_reference_tree/-/merge_request...
In case you need a patch for your own test.
- 🇦🇺Australia geoffreyr
@Mingsong Good catch on the data typing, thanks for making the change!
- 🇬🇧United Kingdom SirClickALot Somerset
Hi chaps, I'm suffering from the limit of 1024 too and I have tried everything in my limited brain to try to knock up a tiny module to attempt find any and all widgets of type
entity_reference_autocomplete
in any forms and simply whack them up in size but to no avail because frankly my coding at the level is useless!Sounds like you guys might have this nailed though for future release.
What exactly do I need to pick up from here (patch etc) to get my use of the module so that I can indeed populate my taxonomy reference fields with this level of data...
Fingers crossed you can help/guide 'cos I'm stuck fast.
Thanks
- 🇦🇺Australia mingsong 🇦🇺
Hi @Nick Abbott, thanks for your comment.
Can I take it that you tested the patch and the issue you came across solved by the patch in #8?
- 🇬🇧United Kingdom SirClickALot Somerset
Thanks @mingsong → ,
That fixed it all up for me perfectly!
-
mingsong →
committed 720390c1 on 2.x authored by
geoffreyr →
Issue #3456598 by mingsong, geoffreyr, sirclickalot: Extend autocomplete...
-
mingsong →
committed 720390c1 on 2.x authored by
geoffreyr →
- 🇦🇺Australia mingsong 🇦🇺
Thanks.
Released with the develop version.
https://www.drupal.org/project/entity_reference_tree/releases/2.x-dev →