hook_views_pre_view() gets $view, $display_id, $args as an argument.

When the view is rendered normally, the arguments are available in $view->args but not the $args argument.

When the same view is rendered via views_ajax(), the arguments are available in the $args argument, but not in $view->args.

So.. in $view->preview, I moved the ->set_arguments() call up above the hook invoke, and also made the $view->args the argument value, instead of $args. This way, both possible sources are populated correctly in both situations.

CommentFileSizeAuthor
preview_arguments.patch1.05 KBcatch
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

dawehner’s picture

Status: Needs review » Fixed

There is nothing which can be added here. Thanks!

Committed to 7.x-3.x and 6.x-3.x

Status: Fixed » Closed (fixed)

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

Anonymous’s picture

Issue summary: View changes

Updated issue summary.