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

slv_’s picture

This 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.

slv_’s picture

This 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.

slv_’s picture

Status: Active » Closed (fixed)