After examining the code more carefully, I've identified the exact cause of the issue and implemented a complete solution.
The problem occurs in cookies_addons_views_preprocess_views_view() where we completely reset the $variables array:$variables = [];
This operation wipes out all existing values, including the critical theme_hook_original key that Drupal's theme system needs. This is what causes the warning.
My solution preserves and restores this important value:$theme_hook_original = $variables['theme_hook_original'] ?? '';
$variables['theme_hook_original'] = $theme_hook_original;
This approach:
- Saves the theme hook information before it's lost
- Allows us to still reset the variables array as needed
- Ensures the theme system has the information it needs at render time
-
guido_s →
committed cac507ec on 1.0.x authored by
scontzen →
Issue #3503041: Fix missing theme_hook_original in preprocess function
-
guido_s →
committed cac507ec on 1.0.x authored by
scontzen →
Automatically closed - issue fixed for 2 weeks with no activity.