My custom module defines a custom entity, which extends the EntityAPIController class. I managed to make it basically working, i.e. displaying fields etc via my custom tpl.php file. But I would like to create a
mymodule_preprocess_entity function (as suggested here) to add custom variables to the tpl.php file. But such function is not running (is not called).
Also, when I display this entity, I noticed that the function
template_preprocess_entity(&$variables) from entity.module is not running, either.
What else needs to be defined to make the preprocess function for custom entity being called?