Hello,

When I want to create and index taxonomie term with search api i have this error message.

PDOException : SQLSTATE[42S22]: Column not found: 1054 Unknown column 'vocabulary_machine_name' in 'where clause': INSERT INTO {search_api_item} (item_id, index_id, changed) SELECT t.tid AS item_id, :index_id AS index_id, 1 AS changed FROM {taxonomy_term_data} t WHERE (vocabulary_machine_name IN (:db_condition_placeholder_0)) ; Array ( [:db_condition_placeholder_0] => modeles_etg [:index_id] => 9 ) dans SearchApiEntityDataSourceController->startTracking() (ligne 169 dans /sites/all/modules/contrib/search_api/includes/datasource_entity.inc).

Tks

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

smitty’s picture

Me too! Please help ...

drunken monkey’s picture

Assigned: » Unassigned

Cannot reproduce this, sorry! For me, creating an index for taxonomy terms works perfectly fine.
I'd guess you have some module installed that messes this up (i.e., by declaring the vocabulary's machine name it's primary entity ID)?

drunken monkey’s picture

Status: Active » Postponed (maintainer needs more info)
chr.fritsch’s picture

Version: 7.x-1.15 » 7.x-1.16
Status: Postponed (maintainer needs more info) » Active

Got the same issue when i use the bundle restriction in the DATASOURCE OPTIONS.

smitty’s picture

That is exactly ma issue. If i restrict the the index to two taxonomy-bundles out of 5 Taxonomies I get the error.
If I do not restrict and accept that all 5 bundles are indexed the index is created without any problem.

drunken monkey’s picture

Title: Error load taxonomie term » Error when creating a taxonomy term index with subset of bundles
Status: Active » Needs review
FileSize
3.29 KB

Ah, you're right, that really doesn't work!
The attached patch should fix this. Please test!
Thanks for reporting!

Status: Needs review » Needs work

The last submitted patch, 6: 2524314-6--create_taxonomy_term_indexes.patch, failed testing.

smitty’s picture

Works fine for me. Thanks!

akosipax’s picture

Status: Needs work » Reviewed & tested by the community

Works fine for me as well.

Status: Reviewed & tested by the community » Needs work

The last submitted patch, 6: 2524314-6--create_taxonomy_term_indexes.patch, failed testing.

drunken monkey’s picture

Version: 7.x-1.16 » 7.x-1.x-dev
Status: Needs work » Needs review
FileSize
3.29 KB

Weird stuff …

drunken monkey’s picture

Status: Needs review » Fixed

OK, seems to be fine now, weird testbot flukes …
Anyways, thanks for testing, good to hear it works for you, too!
Committed.

  • drunken monkey committed 11dcade on 7.x-1.x
    Issue #2524314 by drunken monkey: Fixed bundle-setting for taxonomy term...

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.

aschiwi’s picture

Was this added to 7.x-1.18? I am getting this error just as described here - I have 2 of 5 vocabularies selected in a multilingual term index.