- Issue was unassigned.
- Status changed to RTBC
almost 2 years ago 2:52am 16 January 2023 - Status changed to Closed: won't fix
almost 2 years ago 10:29am 16 January 2023
We're talking at
https://www.drupal.org/project/drupal/issues/106721#comment-14115502 →
and on the file
core/modules/node/src/NodeGrantDatabaseStorage.php
there is a method buildGrantsQueryCondition that we can use early return to be easier to ready and avoid Hadouken effect
Change from:
protected function buildGrantsQueryCondition(array $node_access_grants) {
$grants = $this->database->condition('OR');
foreach ($node_access_grants as $realm => $gids) {
if (!empty($gids)) {
$and = $this->database->condition('AND');
$grants->condition($and
->condition('gid', $gids, 'IN')
->condition('realm', $realm)
);
}
}
return $grants;
}
To:
protected function buildGrantsQueryCondition(array $node_access_grants) {
$grants = $this->database->condition('OR');
foreach ($node_access_grants as $realm => $gids) {
if (empty($gids)) {
continue;
}
$and = $this->database->condition('AND');
$grants->condition($and
->condition('gid', $gids, 'IN')
->condition('realm', $realm)
);
}
return $grants;
}
Closed: won't fix
10.1 ✨
Not all content is available!
It's likely this issue predates Contrib.social: some issue and comment data are missing.