I am developing a new theme based on omega theme and I use context and delta to configure how my theme will display on different pages.
If I create a new context with a condition node-type for a specific content-type then the theme_preprocess_node function is not called for this content-type..
If I remove the context then the preprocessor works as normal..

Comments

Chaulky’s picture

I'm also running into this issue, but so far only if I also have a Block context. In reality I really just needed to know if I wasn't on a node page. So I created a context to check for node pages (which by itself didn't ruin my preprocess_node function) and then made another context to check that the first context was not active.

candelas’s picture

Version: 7.x-3.0-beta2 » 7.x-3.0-beta6
Assigned: lsdoc77 » Unassigned

me too, but in the 7.x-3.0-beta6
using omega 7.x-3.0-rc2
i cant in node and page preprocess if i use omega preprocess-node.inc or preprocess-page.inc
if i disable context, they work.

i read in context 7.x-3.0-beta7 release notes #1940616 by opi: Wrong comment for context_preprocess_page()
has any relation?

i remove lsdoc77 from assigned because i think he didnt understand that that means to resolve it.

thanks for this useful module, its the first time i have a problem with it :)

candelas’s picture

Title: preprocess_node does not work » preprocess_node does not work with $variables
Category: bug » support

hello and sorry for my bad english :)

i just realize that must be something with the $varibables scope because if i make print, it is made.

what i pretend to do is to hide the nodes from the taxonomy/term/tid

function crag_alpha_preprocess_page(&$vars){
  if (arg(0) == 'taxonomy' && arg(1) == 'term'  && is_numeric(arg(2))){
    //dpm($vars, "vars") ;    
    unset($vars['page']['content']['system_main']['nodes']);
    unset($vars['page']['content']['system_main']['pager']);
    unset($vars['page']['content']['system_main']['no_content']);
    //print "hola";
  }
}

if i uncoment print "hola"; it gets printed.
if i uncoment //dpm($vars, "vars") ;
i see that it shows $vars['page']['content']['content']['system_main']['nodes']

i have tried also (with and without the extra ['content']) with not success

    hide($vars['page']['content']['system_main']['nodes']);
    $variables['page']['content']['system_main']['nodes'] = null;

do you have any clue about this, please? at the moment i have resolved the nodes with the node.tpl.php and with css the pager and no_content, but i would like to be able to use theme functions of this kind (other functions that doesnt use $variables work).

thanks :)