- π³π±Netherlands Lendude Amsterdam
It sounds like #12 might be the thing, that distinct causes this. There are older indications that distinct can cause some problem when looking at the comment in \Drupal\views\Plugin\views\query\Sql::execute
// Count queries must be run through the preExecute() method. // If not, then hook_query_node_access_alter() may munge the count by // adding a distinct against an empty query string // (e.g. COUNT DISTINCT(1) ...) and no pager will return. // See \Drupal\Core\Database\Query\PagerSelectExtender::execute() // See https://www.drupal.org/node/1046170.
So we might be doing something special for distinct in count queries?
Some confirmation that this is indeed the issue would be great, sotra feels like stabbing in the dark right now.
- π³π±Netherlands johnv
Having the same problem when filtering in hook_views_post_execute() or hook_views_pre_render() .
- Status changed to Closed: outdated
1 day ago 2:47pm 7 August 2025 - πΊπΈUnited States smustgrave
Since there's been no follow up to #17 going to close this one out.