Closed (works as designed)
Project:
Panelizer (obsolete)
Version:
7.x-3.0-rc1
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
1 Nov 2012 at 14:39 UTC
Updated:
2 Nov 2012 at 09:07 UTC
I'm not entirely certain if this is a bug, but it sure doesn't seem right. I'm using Drupal 7.16, Panels 7.x-3.3 and Panelizer 7.x-3.0-rc1, as well as a custom theme with 2 hook implementations (template_preprocess_node() and hook_form_FORM_ID_alter()).
The node preprocess hook triggers on nodes even with the node template page enabled in Panels, but not on nodes of a content type that is panelized. This is how the hook looks:
function ocs_preprocess_node(&$vars) {
dpm($vars);
}
So I definitely know when it does or does not trigger. If this is by design, what are the alternatives? Does Panelizer provide its own equivalent hooks?
Comments
Comment #1
damienmckennaDo you have the node's main "content" field displayed on the page?
Comment #2
merlinofchaos commentedtemplate_preprocess_node() only happens when a node_view() is called; if you do not have the "node: content" pane in place, then node_view() will not be called. theme('node') will therefore never be called. This is not a bug, this is a complication of the interaction between Drupal, which doesn't really understand anything about Panelizer, and a system designed to do things in a completely different way.
Comment #3
Riari commentedAh, bingo! I need to remember to use that instead of the body field, then. Thanks.