Revert preprocess hook renaming - Preprocess hooks not firing early enough

Created on 15 January 2024, 12 months ago
Updated 14 February 2024, 11 months ago

Problem/Motivation

When hooking into the preprocess hook for "preprocess_views_secondary_row_view_table", the original module's preprocess is not firing first.

Steps to reproduce

1. Create a custom module
2. Hook into views_secondary_row_view table: function MYMODULE_preprocess_views_secondary_row_view_table(&$variables)
3. Custom module hook fires before "Views Secondary Row" hook (potentially due to module order of execution)

Proposed resolution

Revert the theme functions back to use "template_" rather than "modulename_" preprocess hooks.

I've done a lot of exploration into how the hooks work for this, and I'm 99% sure that this module should be using a template hook here as it is defining the "default behaviour" and variables for the hooks, but please correct me if I'm wrong!

Changing them to use template hooks, which execute first in the process, works for me and resolves my issues meaning I can hook into the function with no fear of getting in before the module has ran its' logic.

🐛 Bug report
Status

Fixed

Version

1.2

Component

Code

Created by

🇬🇧United Kingdom littlepixiez

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Production build 0.71.5 2024