Hi,
I figured out that taxonomy_manager_autocomplete_load has a query, where range is hardcoded to 30. So whenever I use that I can see only 30records, if there is more than 30 records it simply ignores that. Is there any way to show all the records? I have herewith added part of a code from taxonomy manager module.

 // Select rows that match by term name.
    $tags_return = $query
      ->fields('t', array('tid', 'name'))
      ->condition('t.vid', $vid)
      ->condition('t.name', '%' . db_like($last_string) . '%', 'LIKE')
      ->range(0, 30)
      ->execute()
      ->fetchAllKeyed();

Thank you

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

rojan raj created an issue. See original summary.

ziomizar’s picture

Category: Bug report » Feature request

Thats seems fine, you don't want to load the whole list of terms (talking about thousands of terms).

To get a more restricted list of words in autocomplete you should just write a more specific word.

rojan raj’s picture

Yes I tried that too but its restricting me to only 30 records.
Lets say, I have a 50 term with name "drupal". if I write drupal autocomplete suggestions will give me only 30records.

rojan raj’s picture

Category: Feature request » Task
Status: Active » Needs review
FileSize
781 bytes

Just a simple patch to configure range in query while autocompleting terms.

ziomizar’s picture

+  // Set a drupal variable and get the value
+  $range_limit = variable_get('range_limit', 30);
     // Select rows that match by term name.

range_limit seems too generic as variable name, a better name would include also taxonomy_manager in the name.

This solution solve the problem just for the advanced users, is better than an hardcoded value but still not configurable for most users.

ziomizar’s picture

Status: Needs review » Needs work
rojan raj’s picture

Status: Needs work » Needs review
FileSize
833 bytes
ziomizar’s picture

Version: 7.x-1.0 » 7.x-1.x-dev
lhguerra’s picture

In drupal 8 this is even worse, the limit is 10 and the autocomplete is the only way to search, it's not like I could press enter and see a search result with pagination. I'm almost giving up and creating a custom view

lhguerra’s picture

Version: 7.x-1.x-dev » 2.0.4
FileSize
1.14 KB

I found where I could patch this to increase the limit, I don't think it's a very good patch since it is not configurable but it might help someone.