Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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.
Comment | File | Size | Author |
---|---|---|---|
preview_arguments.patch | 1.05 KB | catch | |
Comments
Comment #1
dawehnerThere is nothing which can be added here. Thanks!
Committed to 7.x-3.x and 6.x-3.x
Comment #2.0
(not verified) CreditAttribution: commentedUpdated issue summary.