I ran into this as a result of applying the patch in #1330716: Views substitutions broken after db_safe() update - now committed to views 6.x-2.x.

I was getting PHP errors using the autocomplete filter because views_get_current_view() was not returning an object.

Adding $view->pre_execute() was one way of setting the current view and this got me thinking: should this be called anyway to allow pre-execution hooks to run? All I know about the views API is what I've seen tracking this down this afternoon.

Attached is a two-line patch for consideration adding in calls to $view-pre_execute() and $view->post_execute().

CommentFileSizeAuthor
pre_execute.patch672 bytesjacktonkin
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

jwilde’s picture

thanks, this worked great. Jim

colan’s picture

Issue summary: View changes
Status: Needs review » Closed (outdated)