I had some problems embedding some views display plugins with viewfield. This specially affected views_accordion, which didn't work at all with viewfield. I found that the outputcall made by viewfield on line 123 to 130 in viewfield.theme.inc

    if (!empty($view)) {
      $view->set_display($display);
      $view->set_arguments($view_args);
      if ($view->access(array($display), $user)) {
        $view->execute_display();
        $output .= $view->render();
      }
    }

could be replaced with a single

$output .= $view->preview($display, $view_args);

Then everything works as expected.

Comments

mnlund’s picture

Actually I think the right way to embed the view is to use views_embed_view(). This is derived from the following discussion: http://drupal.org/node/246742

darren oh’s picture

Status: Active » Needs review

Patch attached. Due to other problems, I am not yet able to test it.

darren oh’s picture

Status: Needs review » Closed (duplicate)

Forgot to attach the patch. The patch should solve issue 373373, so I'm adding the patch there and marking this as a duplicate.