- Issue created by @kcolwell
- πͺπΈSpain lpeidro Madrid
Hello @kcolwell,
I am trying to replicate the results you have shown, but I am unable to do so.
Both queries are quite simple.
The first one:
$query->accessCheck(FALSE) ->condition('status', '1') ->groupBy('type') ->aggregate('nid', 'count', NULL, $alias_count) ->execute();
This query counts all the published nodes grouped by type.
The second one:
$query->accessCheck(FALSE) ->currentRevision() ->aggregate('nid', 'COUNT', NULL, $alias) ->groupBy('langcode') ->groupBy('type') ->sort('type') ->sort('langcode') ->execute();
This query does the same but grouped by type and language.
The only fundamental difference between the two queries is the use of currentRevision().
There are two possibilities:
- The currentRevision() method is needed in the first query to avoid counting all revisions, but I am not sure about that.
- There are 81 active languages on the site.I am going to add the currentRevision() flag to the first query for consistency.
However, how many translations does each node have?
Thank you very much.
- πͺπΈSpain lpeidro Madrid
Added the "currentRevision" to the first query to unify.
- Status changed to Needs review
about 2 months ago 3:42pm 19 September 2024