Issue: when using the autocomplete, a sql error is generated in entityreference_autocomplete_autocomplete_callback(), resulting in a 500 error being returned to the user (and no entities to choose from).
Problem: the $label_column is not found, causing $query->propertyCondition($label_column, '%' . $last_label . '%', 'LIKE'); to fail.
Reason: In entityreference_autocomplete_resolve_entity_label_column() the first line is entity_get_info($entity_type);, which should be $entity_info = entity_get_info($entity_type);. This will allow the following if statement to correctly find the label column. The function entity_get_info() returns a value, it does not operate on its parameters.
I was using this module with commerce_products, so in my case the label column is "title".
| Comment | File | Size | Author |
|---|---|---|---|
| entity_label_column-0.patch | 654 bytes | kscheirer |
Comments
Comment #1
ndrosev commentedYes ,that patch works fine. I made the same patch yesterday and I have an idea to post it today ,but you were faster than me. Thanks and confirm that it works.
Comment #2
ndrosev commentedReview passed. Works
Comment #4
slv_ commentedRight, that's a bugfix I introduced with the refactoring done on the last release. Not sure how I missed that one.
committed and pushed to 7.x-1.x-dev
Thanks!