When using EVA (https://www.drupal.org/project/eva) - which allows you to attach views to the $content var - hook_preprocess_views_view doesn't function instead template_preprocess_eva_display_entity_view is required to preprocess views.

To replicate:
Enable, configure and use EVA for at least one view
Enable views_ajax_get
Observe selected view(s) ajax not using 'GET'

The module needs to be updated to use eva's preprocess hook. Patch incoming.

Comments

Paul Rowell created an issue. See original summary.

paul rowell’s picture

StatusFileSize
new945 bytes

Patch attached

paul rowell’s picture

Status: Active » Needs review

*change status*

leon kessler’s picture

Thanks. I assumed that hook_preprocess_views_view() would run for everything. As this is not the case maybe we should move to using another hook completely, such as hook_views_pre_render()

There are other modules that embed Views in different ways, so this could also be an issue for them.
e.g.
viewsfield
views_field_view

leon kessler’s picture

StatusFileSize
new620 bytes

Patch attached with switch to using hook_views_pre_render().

Paul, can you check this works with your EVA views?

paul rowell’s picture

Hi Leon,

Thanks for this, you beat me to it :) Tested and looks good over here.

  • leon.nk committed f80f7bd on 7.x-1.x
    Issue #2564371 by Paul Rowell, leon.nk: hook_preprocess_views_view doesn...
leon kessler’s picture

Status: Needs review » Fixed

Great, added to dev. Thanks.

Status: Fixed » Closed (fixed)

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