$view = views_get_view('my_view');
  // Get the output for first display.
  $view_html = $view->preview('display_1');
  // Get the output for 2nd display.
  $view_html = $view->preview('display_2');
  // $view_html is the same both times!!!

The problem is this line in execute():

    if (!empty($this->executed)) {
      return TRUE;
    }

Because the view is marked as having already been executed, the query for the second display isn't run.

Comments

MustangGB’s picture

Category: Bug report » Support request
Priority: Major » Normal
Status: Active » Fixed

Why don't you unset executed then?

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.