I'm only translating taxonomy terms using entity_translation and I got this error on all screens.

Attached patch changes the vocabulary_machine_name condition to a condition using vid.

Comments

berdir’s picture

Terms were recently changed to support entityCondition('bundle', $bundle), can we maybe switch to that?

attiks’s picture

@Berdir, to be honest no idea, I guess so

berdir’s picture

Status: Active » Needs review

Oh, we're using a direct query and not EFQ. So ignore what I said.

Right, then this makes sense. The only thing I'm not sure about is if we should move this into the function that actually does the query. You can see that we already have a special case for comments in there. so we could simply add another one that switches the key as necessary. Should be a much easier patch.

berdir’s picture

And comment could be improved to to a join to the node table and then add the type condition there :)

attiks’s picture

#3 I had in the general function first, but moved it because it's only needed for the entities.

berdir’s picture

Not sure I follow your argument, we already have a special case for comments in there (that could be improved) so why not do the same for taxonomy terms there?

attiks’s picture

Berdir, either place is fine by my, I don't know when I can reroll the patch, I pushed it live already ;-) so feel free to reroll.

malberts’s picture

I'm using the patch in #0 for now.

miro_dietiker’s picture

Assigned: Unassigned » blueminds

Martin, can you please make sure this goes in. Check with Berdir about how the solution should look like.

berdir’s picture

StatusFileSize
new1.02 KB

Here's an updated patch. Also updated the comments comment there a bit, as I got confused and didn't see the stuff below initially.

berdir’s picture

Tests, including tests for the new bundle column.

Status: Needs review » Needs work

The last submitted patch, tmgmt-term-bundle-filter-1931012-11-test-only.patch, failed testing.

berdir’s picture

Status: Needs work » Fixed

Commited and pushed.

Status: Fixed » Closed (fixed)

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