1

I'm implementing a block in Drupal to show comments of the user in his/her profile.

I am using EntityFieldQuery and entity_load and the query works fine. I'm trying to use devel module but I can't see the result by using Krumo function. Any idea what's wrong with my code or how should I use the devel module?

I got this error:

Fatal Error: call to undefined function Krumo

$items = entity_load('comment', array_keys($result['comment']));
krumo($items);
andr
  • 15,970
  • 10
  • 45
  • 59
nooshinha
  • 249
  • 5
  • 15
  • Do you have `print $messages` in you `page.tpl.php`? Please see http://drupal.stackexchange.com/questions/24217/dpm-does-not-display-any-results-on-screen – leymannx Mar 19 '15 at 14:16

3 Answers3

3

You could use kpr() which prints output outside of the template area, or drupal_debug() (alias dd()) which print variables in a file called drupal_debug.txt in the site's temp directory.

claire_
  • 723
  • 2
  • 8
  • 17
1

Install the devel module and us dpm($items);

2pha
  • 9,798
  • 2
  • 29
  • 43
  • I installed devel module. but drupal don't recognize the krumo function. I clear my cache I set all the configuration. I have no idea what was wrong. I unintalled it and install again and it seems everything works fine now! – nooshinha Mar 06 '13 at 14:50
0

Other Reason can be,

  • you need to be logged in as an admin user
  • or you need to give "view debug info" permission to your desired role.
Sanjok Gurung
  • 948
  • 4
  • 17
  • 33