Skip to content

Commit

Permalink
Issue #3485498: Fix PHP exception in activity visibility filter relat…
Browse files Browse the repository at this point in the history
…ed to views join
  • Loading branch information
Kovalskiy266 committed Nov 12, 2024
1 parent 762a8ba commit ac7e15e
Showing 1 changed file with 15 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,21 @@ public function query(): void {
$query->addRelationship('post__field_visibility', $join, 'post__field_visibility');

if ($account->isAnonymous()) {
$configuration['table'] = 'node_field_data';

$configuration = [
'left_table' => 'activity__field_activity_entity',
'left_field' => 'field_activity_entity_target_id',
'table' => 'node_field_data',
'field' => 'nid',
'operator' => '=',
'extra' => [
0 => [
'left_field' => 'field_activity_entity_target_type',
'value' => 'node',
],
],
];

/** @var \Drupal\views\Plugin\views\join\JoinPluginBase $join */
$join = Views::pluginManager('join')->createInstance('standard', $configuration);
$query->addRelationship('node_field_data', $join, 'node_field_data');
Expand Down

0 comments on commit ac7e15e

Please sign in to comment.