I'm facing an issue for a few hours now. I created a new module that must render an admin page with some settings and another one with analytics data. The second one must use a custom template file that I created for the occasion.
I added a hook_theme()
in my .module file and everything worked fine for a while.
When refactoring my code I wanted to move the hook_theme()
in a subfile.inc of my module. Even though I cleared the caches, I always get the issue Theme hook "my_custom_template" not found..
After moving back the hook in the .module file everything work again.
Are they some hooks that must be in the .module file only. As the hook_install()
and hook_uninstall()
must be in the .install file?