In case there are several instances of the referenced entity that match the user search entry, the server may time out and throw a 500 error. I updated the code to limit the number of returned results to 100. I suggest making this configurable in settings.
In entityreference_autocomplete_autocomplete_callback:
before:
$query->propertyCondition($label_column, '%' . $last_label . '%', 'LIKE');
$result = $query->execute();
after:
$query->propertyCondition($label_column, '%' . $last_label . '%', 'LIKE');
$query->range(0, 100);
$result = $query->execute();
Comments
Comment #1
slv_ commentedThis is something I never wrote but alway knew I had to implement ,although I had totally forgotten by now.
We'll get to it asap.
Thanks a lot for the feedback wmad.
Comment #2
slv_ commentedThis is now implemented in 7.x-1.x-dev, and will be available in the next stable release as well.
Commitdiff: http://drupalcode.org/project/entityreference_autocomplete.git/commitdif...
Thanks for the suggestion.
Comment #3
slv_ commented