The autocomplete implementation is broken because it does not search for the actual search string provided. This bug makes the module completely unusable...

Fixed by adding the following code

  $where = '(n.title LIKE :title) AND';
  $where_args[':title'] = '%' . $string . '%';

to smartqueue_language_nodequeue_autocomplete().

This is related to an issue with nodequeue itself, probably should be fixed over there bu I'm not sure... #1860108: Wrong implementation of hook_nodequeue_autocomplete()

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

greggadsdon’s picture

This patch implements hook_query_TAG_alter() for the tag in the nodequeue_api_autocomplete query supplied by this patch: https://drupal.org/files/issues/nodequeue-query_add_tag-2231793-9.patch

This means allows Smartqueue language to step in and just add language conditions to the query generated by nodequeue.

KarlShea’s picture

Status: Active » Needs review

Patch in #1 worked for me along with the patch to nodequeue in the referenced issue.

KarlShea’s picture

Actually this patch broke autocomplete for non-smartqueue queues. I've changed the patch so it only adds the language condition when the unserialized $queue->reference is null and that seems to have fixed it.

sbrattla’s picture

Is a solution to #2231793: Autocomplete does not pass autocomplete text to hook required to get this issue solved and closed?

KarlShea’s picture

If I remember right that is correct. I'm pretty sure I needed both.

AlxVallejo’s picture

This is a great module if used wisely.

If you're including 'All' languages in the nodequeue settings, the autocomplete did not consider the default language .. only the subqueue reference language. I'm adding a patch that adds the default language to that list. This is especially useful when using Entity Translation so that you have access to the default language nodes.

asrob’s picture

Updated patch for 7.x-1.x-dev.