1

I called krumo() inside hook_node_load().

function mymodule1_node_load($nodes, $types) {
    krumo($nodes);
}

It works on my front page, but not on a node page. I get this error message:

Fatal error: Call to undefined function krumo() in C:\wamp\vhosts\mydrupal72\sites\all\modules\my_customs\mymodule1\mymodule1.module on line 126

Why can't I run krumo() on a node page?

  • because krumo() is not defined. – No Sssweat Mar 14 '17 at 4:53
  • Huh?? How is it not defined? Devel module is installed and enabled. Why does it work on front page but not a node page? – okey_on Mar 14 '17 at 4:56
  • 2
    Try to use dsm() or dpm() instead – Yuseferi Mar 14 '17 at 6:01
0

An option would be using module_load_include(). Manually making sure it's loaded

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.