Eduardo G. Posted October 11, 2016 Share Posted October 11, 2016 Hi! I use several custom addons and whmcs 7 has broken them all. Each addon has its own templates, using smarty. But now, when I render a template, I get: Error: Fatal error: Uncaught --> Smarty: Unable to load template file 'my_template.tpl' It happens with any simple template, so I see no specific tags causing problemas. I've also tried Smarty Security Policy's bypass, using: $smarty_security_policy => array( 'system' => array( 'trusted_dir' => array( '/path/to/my/addon', '/path/to/my/addon/templates', ), ), ); But still same error. Can't find the source of the error and can't get any help from whmcs support. Can someone else help me? Thanks. 0 Quote Link to comment Share on other sites More sharing options...
twhiting9275 Posted October 11, 2016 Share Posted October 11, 2016 I just checked this one myself, and cannot replicate this. In your addon module, make sure you have 'templatefile' => 'my_template', In addition, make sure that you have my_template.tpl in the addon directory (not in your template directory). if you're storing this as addon/templates/my_template.tpl, change 'templatefile' => 'my_template', to 'templatefile' => 'templates/my_template', the template path will always be relative to the addon itself. If you didn't design the addon, you'll want to talk to the developer of the addon, as it's likely encoded 0 Quote Link to comment Share on other sites More sharing options...
Eduardo G. Posted October 12, 2016 Author Share Posted October 12, 2016 Thanks, twhiting9275 Addons are already working on version 6.x, so all paths are ok Problem comes with version 7, so I don't think the code is the problem. Must be something "global", like security policy or similar. Sure it's related with whmcs's smarty integration, but can't guest how :-( Any other idea? 0 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.