Coming form #1461670: Generalize to work with any Entity Type we noticed there is an implementation for hook_entity_query_alter() as a workaround for #1054168: EntityFieldQuery fails for entities that have no bundle for user entities.
The hook only checks the value, not the operator. As far as I can see, this is to fix the specific uses of the EnittyFieldQuery for xmlsitemap. In stead, we should fix the uses, in stead of (possibly wrongfully) altering the EntityFieldQuery.
This hook can potentially break uses of the EntityFieldQuery. For example:
$efq = new EntityFieldQuery();
$efq->entityCondition('entity_type', 'user', '<>');
$efq->entityCondition('bundle', 'a_bundle_that_exists_on_multiple_entity_types');
Granted, it is an edge case, but it still exists. I'll see if I can whip up a patch.
| Comment | File | Size | Author |
|---|---|---|---|
| #6 | 3011651-3-xmlsitemap-fix-entity-field-query-uses.patch | 3.47 KB | jelle_s |
Comments
Comment #2
jelle_sComment #3
jelle_sHad a continue; outside of a loop (copy paste error), changed it to a return;
Comment #4
jelle_sThat patch contained changes from the other issue... I need more sleep.Aaaand... I've added this to the wrong issue
Comment #5
jelle_sComment #6
jelle_sJust so the last patch is the correct one.