Account created on 9 January 2025, 4 months ago
#

Recent comments

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
Production build 0.71.5 2024