Possible Views JOIN error

Created on 31 October 2022, about 2 years ago
Updated 15 April 2023, over 1 year ago

Problem/Motivation

This block of code was flagged by my IDE in entity_share_websub_hub_views_data()

 $data[$table]['table']['join'] = [
    'node_field_data' => [
      'left_table' => 'node',
      'left_field' => 'uuid',
      'field' => 'entity_id',
      'extra' => [
        [
          'field' => 'entity_type',
          'value' => 'node',
        ],
      ],
    ],
  ];
  $data[$table]['table']['join'] = [
    'users_field_data' => [
      'left_table' => 'entity_share_websub_hub_subscription',
      'left_field' => 'uid',
      'field' => 'uid',
    ],
  ];

The second statement immediately overrides the first. Should this be

 $data[$table]['table']['join'] = [
    'node_field_data' => [
      'left_table' => 'node',
      'left_field' => 'uuid',
      'field' => 'entity_id',
      'extra' => [
        [
          'field' => 'entity_type',
          'value' => 'node',
        ],
      ],
    ],
    'users_field_data' => [
      'left_table' => 'entity_share_websub_hub_subscription',
      'left_field' => 'uid',
      'field' => 'uid',
    ],
  ];
πŸ› Bug report
Status

Fixed

Version

1.1

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States fathershawn New York

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024