Hi,

I've created a sub-theme and I've tried the following in my page.preprocess.inc file and it doesn't seem to recognize it:

function SUBTHEMENAME_preprocess_page(&$variables) {
print 'TESTING 123';
exit;
}

I've cleared the cache and disabled and re-enabled the theme multiple times and nothing seems to get it to recognize my function.

The weird thing is that my preprocess_html hook is being recognized. Am I doing something wrong or is this a bug in Omega 4?

Thanks,

Steve

Comments

steven.itterly’s picture

Issue summary: View changes
steven.itterly’s picture

I should mention that I have a custom layout called page-main. I've tried creating a page-main.preprocess.inc file in the layout directory with a MYSUBTHEMENAME_preprocess_page_main(&$variables) {} method in it but that is not recognized either. I got this idea from the following thread:

https://www.drupal.org/node/2081485

Can someone please help?

leolandotan’s picture

I'm also experiencing this issue. Tried to copy omega's page.preprocess.inc file and replace my subtheme's .inc, deleted my subtheme's page.preprocess.inc and placed my template_preprocess_page fucntion in my template.php file but still didn't.

leolandotan’s picture

I noticed something, I'm currently using Panels Everywhere and when I disabled it, the Omega "system" w/c is the page.preprocess.inc worked. Still figuring out how to fix this.

BillyTom’s picture

I've got the same problem. Additionally, I can't use hook_preprocess_page from inside a module or in my template.php either.

BillyTom’s picture

@ steven.itterly: Do you also use "Panels Everywhere"? This seems to be a known issue

https://www.drupal.org/node/1153184
https://www.drupal.org/node/2408047

steinmb’s picture

Priority: Critical » Normal
Status: Active » Postponed (maintainer needs more info)

Prob. a module like panels or similar that uses hook_theme_registry_alter() to take over the page, like mention in several comments in here.