function execute_display($display_id = NULL, $args = array()) {
    if (empty($this->current_display) || $this->current_display != $this->choose_display($display_id)) {
      if (!$this->set_display($display_id)) {
        return FALSE;
      }
    }
   ...

$this->choose_display returns current value if passed non-array, so second part of equation is $this->current_display != null, so current display is set but doesn't equal null it goes into set_display passing the null $display_id

  function set_display($display_id = NULL) {
    // If we have not already initialized the display, do so. But be careful.
    if (empty($this->current_display)) {
      $this->init_display();

      // If handlers were not initialized, and no argument was sent, set up
      // to the default display.
      if (empty($display_id)) {
        $display_id = 'default';
      }
    }

    $display_id = $this->choose_display($display_id);
    // If no display id sent in and one wasn't chosen above, we're finished.
    if (empty($display_id)) {
      return FALSE;
    }

Which repeats the same choose_display logic that returns null, then returns false, which then returns false from execute_display. (Note: since current display is set, it skips the top part cause display is already set).

Patch changes the logic to ($this->current_display != $this->choose_display($display_id))

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Chris Matthews’s picture

Status: Needs review » Needs work
Issue tags: +Needs reroll

The 6 year old patch does not apply to the latest views 7.x-3.x-dev and if still applicable needs a reroll.

Checking patch includes/view.inc...
error: while searching for:
   * If you simply want to view the display, use view::preview() instead.
   */
  function execute_display($display_id = NULL, $args = array()) {
    if (empty($this->current_display) || $this->current_display != $this->choose_display($display_id)) {
      if (!$this->set_display($display_id)) {
        return FALSE;
      }

error: patch failed: includes/view.inc:1325
error: includes/view.inc: patch does not apply
Andrew Answer’s picture

Status: Needs work » Needs review
Issue tags: -Needs reroll
FileSize
652 bytes

Patch rerolled.