dems Posted July 1, 2016 Share Posted July 1, 2016 (edited) Hello ! I am working on the implementation of a Prestashop Back Office module. I added the new Tab in the install fileI have error messages on the display of the view. The Admin Controller file is in attachment. The module name is : mydashboard I placed the tpl file in the folder /web/modules/mydashboard/views/templates/admin/mydashboard Error messages are /var/www/clients/client2986/web12226/web/modules/mydashboardFatal error: Uncaught exception 'SmartyException' with message 'Unable to load template file '/var/www/clients/client2986/web12226/web/admin11/themes/default/template//var/www/clients/client2986/web12226/web/modules/mydashboard/views/templates/admin/mydashboard/dashboard.tpl'' in /var/www/clients/client2986/web12226/web/tools/smarty/sysplugins/smarty_internal_templatebase.php:127 Stack trace: #0 /var/www/clients/client2986/web12226/web/classes/controller/AdminController.php(1152): Smarty_Internal_TemplateBase->fetch() #1 /var/www/clients/client2986/web12226/web/classes/controller/Controller.php(185): AdminControllerCore->display() #2 /var/www/clients/client2986/web12226/web/classes/Dispatcher.php(348): ControllerCore->run() #3 /var/www/clients/client2986/web12226/web/admin11/index.php(50): DispatcherCore->dispatch() #4 {main} thrown in /var/www/clients/client2986/web12226/web/tools/smarty/sysplugins/smarty_internal_templatebase.php on line 127 AdminMyDashboardController.php Edited July 1, 2016 by dems (see edit history) Link to comment Share on other sites More sharing options...
roja45 Posted July 1, 2016 Share Posted July 1, 2016 I think you should move your initContent code to renderView, and render and return your template from their. The initContent renders the html to be displayed inside the general layout of the admin screens. Not exactly sure what happens when you call setTemplate from the initContent function, it will be calling the createTemplate function on the AdminController and not the ModuleAdminController, so it's probably looking for a controller template to override, and since you don't have an override_folder value set, I'm not sure where it is looking for the template. lebriconome by the looks of the error message. (Basically it's looking in a different place than you think for the template, and can't find it..) Link to comment Share on other sites More sharing options...
dems Posted July 1, 2016 Author Share Posted July 1, 2016 (edited) Thanks ! I updated the error message on my initial question. It was mydashboard folder and not lebriconome on my error message. I will try with AdminController Edited July 1, 2016 by dems (see edit history) Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now