Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
But if, when viewing a node, I activate the overlay system using the admin menu, and reload (ctrl+r), the dpm/debug info is displayed inside the overlay.
I can't understand why it is happening. I'm clearing cache a lot, and on rare occations, I see some debug info. But I can see no pattering to why it is so. Any ideas?
Comments
Comment #1
borgewarvik CreditAttribution: borgewarvik commentedI think I have norrowed this down to dpm()-calls inside my preprocess-node.inc file. I get dpm() calls working from preprocess-page.inc.
Comment #2
marcoka CreditAttribution: marcoka commentedComment #3
marcoka CreditAttribution: marcoka commentedComment #4
WorldFallz CreditAttribution: WorldFallz commentedyep-- i can confirm this also. For some reason calls anywhere but page.tpl.php or preprocess_page dont seem work (and work fine when other themes are used).
I've tried copying the page.tpl.php file to my subtheme and manually printing $messages but that doesn't seem to have any effect (other than printing the messages twice).
So far I've checked node.tpl.php/preprocess_node, comment.tpl.php/preprocess_comment, comment-wrapper.tpl.php, field.tpl.php, and a custom module specific hook as well.
With the insane amount of variables in d7 this is a huge problem when trying to figure out what variables to use.
Debug() doesn't work either.
Comment #5
WorldFallz CreditAttribution: WorldFallz commentedseems to work in the omega theme proper
, but not the alpha.Comment #6
himerus CreditAttribution: himerus commentedI use a combination of krumo(), dpm(), drupal_set_message(), etc every day in almost every template/preprocess combination possible.
Perhaps for some reason the page you are trying to display it on just isn't rendering it because of some other module/settings?
Comment #7
tim-e CreditAttribution: tim-e commentedUsing debug() works except when you need to debug a monstrous node object with multiple nested values. frustrating that dpm wont work.
Comment #8
marcoka CreditAttribution: marcoka commenteddoes dsm() work for you?
Comment #9
kendouglass CreditAttribution: kendouglass commentedSame here. dpm() and/or debug() gives no output anywhere execept page.tpl.php or preprocess_page
Comment #10
dimduj CreditAttribution: dimduj commentedSuscribe
Comment #11
WorldFallz CreditAttribution: WorldFallz commented@dimduj-- please see the 'follow' button at the top of the issue. Subscribing is no longer necessary.
Comment #12
charlus CreditAttribution: charlus commentedI found a way to display the dsm in the preprocess node hook function.
In the preprocess_node hook function : create and set a global $preprocess_node_dsm, this global will be used in the process_zone hook function. Set this global to 0 when you don't need to dsm some data in the preprocess_node hook function
You can use the hook_process_zone() in your custom template.php as follow :
Comment #13
furamag CreditAttribution: furamag commentedFollowing code works for me but it displays result inline:
Comment #14
eric constantinides CreditAttribution: eric constantinides commented#13 worked like a charm.
Comment #15
frobI just came across this.
For me this was with the paragraphs module. If I did tried to dpm anything from inside the paragraphs.theme.inc file template_preprocess_paragraphs_items function nothing would happen, If I did #13 it works.
Comment #16
vrwired CreditAttribution: vrwired as a volunteer commentedI found (at least on template.php) that simply including within the function (no need to print $export):
$export = kprint_r($vars, TRUE);
will allow for any other dsm() calls to print every time and *without resulting in inline format* but may need to clear cache on occasion
Comment #17
steinmb CreditAttribution: steinmb as a volunteer commentedComment #19
opgobee CreditAttribution: opgobee commentedSame issue: dpm(), debug(), krumo(), drupal_set_message(), solution #13 all no output despite cache flushing from a Class definition in an .inc file in a module: in sites/all/modules/MODULENAME/plugins/***.inc. Normal output from a .module file, template.php etc.
How to get output?