- ivnish Kazakhstan
Drupal 7 is EOL. Issue will be closed, but patches are still here
Hi.
When using flag 7.x-3.x, entityfieldquery can used for property and field query.
But, If you attach entityCondition for bundle filtering, It may return wrong results or empty.
Because, flag_query_flagging_flag_names_alter function attach joins to query for bundle condition.
But, It uses wrong column for joining.
function flag_query_flagging_flag_names_alter(QueryAlterableInterface $query) {
...
if (!isset($tables['flagging'])) {
// All tables that are in the query will be field tables and are equivalent,
// so just join on the first one.
$field_table = reset($tables);
$field_table_alias = $field_table['alias'];
$query->join('flagging', 'flagging', "$field_table_alias.entity_id = flagging.fid");
}
...
}
This code join tables with flagging as fid and entity_id. But it's not id of flagging entity.
we should join with flagging_id of flagging table. It an entity_id of flagging entity.
Closed: outdated
3.0
Flag core
Not all content is available!
It's likely this issue predates Contrib.social: some issue and comment data are missing.
Drupal 7 is EOL. Issue will be closed, but patches are still here