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().
Comment | File | Size | Author |
---|---|---|---|
pre_execute.patch | 672 bytes | jacktonkin |
Comments
Comment #1
jwilde CreditAttribution: jwilde commentedthanks, this worked great. Jim
Comment #2
colan