- πΊπΈUnited States m.stenta
This caused an issue for another user: https://github.com/farmOS/farmOS/issues/834
Drupal entity autocomplete form widgets automatically append the entity ID to the end of the entity name when you select it (eg: "Tractor" becomes "Tractor (123)". It does this so that when the form is submitted it can look up the entity by ID instead of name (which is more accurate). See attached screenshot.
This is acceptable, most of the time. However it can cause some confusion when you're dealing with entities that have numbers for names. For example, the Season taxonomy may have a term "2022". If you try to reference that in the Planting Quick Form, it will become "2022 (123)" - simply because the entity autocomplete widget tacks that on automatically.
Related core issue: π UX: Hide entity ID in autocomplete widget Needs work
As part of the Planting Quick Form v2 port, I found a JavaScript behavior that seemed to do exactly what we want!
https://borutpiletic.com/article/hide-entity-id-autocomplete-field-widge...
I included this in farmOS via this commit: https://github.com/farmOS/farmOS/commit/3365fc5b23e9b95ebcea8e8e65561196...
Today, however, I discovered that this was causing a critical bug: https://github.com/farmOS/farmOS/issues/502
... so I reverted it: https://github.com/farmOS/farmOS/commit/426ef150e8af80ef4b42a86ed6bf3e91...
But I wonder if we could debug it... maybe the script can be used. I think the problem ultimately lies in the fact that the script was completely REMOVING the ID from the text... It might be better if it HID it, but still passed it through to the server.
TBD
Active
3.0
User interface
Not all content is available!
It's likely this issue predates Contrib.social: some issue and comment data are missing.
This caused an issue for another user: https://github.com/farmOS/farmOS/issues/834