Hi all,

I've created a "related terms" relations between taxonomy terms. The Relation add block gives the following ajax error during autocomplete:

Si è verificato un errore HTTP in AJAX.
Codice HTTP di risposta: 500
Di seguito le informazioni di debug.
Percorso: http://mysite.it/relation_add/autocomplete/termini_correlati/target
StatusText: Service unavailable (with message)
ResponseText: PDOException: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'vocabulary_machine_name' in 'where clause': SELECT taxonomy_term_data.tid AS entity_id, :entity_type AS entity_type, NULL AS revision_id
FROM 
{taxonomy_term_data} taxonomy_term_data
WHERE  (taxonomy_term_data.name LIKE :db_condition_placeholder_0 ESCAPE '\\') AND (vocabulary_machine_name IN  (:db_condition_placeholder_1)) 
LIMIT 12 OFFSET 0; Array
(
[:db_condition_placeholder_0] => %ci%
[:db_condition_placeholder_1] => my_vocabulary
[:entity_type] => taxonomy_term
)
in EntityFieldQuery->execute() (linea 1136 di /var/www/mysite.it/includes/entity.inc).

thank you very much

Comments

naught101’s picture

Status: Active » Closed (duplicate)

This is a core bug, not to do with relation. See #1054162: Taxonomy bundles not supported by EntityFieldQuery (followup). If that looks like it's not going to be resolved soon, and you need a workaround, we can probably figure something out.

mxt’s picture

Thank you for your answer, I've added this case to the thread you've linked.

Do you think you can provide the hook_entity_query_alter() implementation suggested as a temporary workaround in "Relation Add" module?

Thank you

EvanDonovan’s picture

I think it might make sense for the hook_entity_query_alter() to live in its own distinct contrib module, specifically to fix bugs in all the modules that this issue will happen in. I will consider doing that, since I currently have it in a custom module.