The join definition below from ga_stats_views_data() does not support table aliases. Example: the below join would generate ga_stats_count_pageviews_today in the views definition, but the actual aliased table name used by views could be node_taxonomy_index_ga_stats_count_pageviews_today.

      $data['ga_stats_count_'.$mkl.'_'.$tk]['table']['join']  = array(
        'node' => array(
          'table' => 'ga_stats_count',
          'left_field' => 'nid',
          'field' => 'nid',
          'type' => 'LEFT OUTER',
          'extra' => 'ga_stats_count_'.$mkl.'_'.$tk.'.metric=\''.$mk.'\' AND ga_stats_count_'.$mkl.'_'.$tk.'.timeframe=\''.$tk.'\''
        )
      );
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

recrit’s picture

Status: Active » Needs review
FileSize
786 bytes

the patch attached fixes the views extra join to use the current alias of the table. @see class views_join