mario5_fcb Posted October 22 Share Posted October 22 Hello everyone. I have a custom module that I developed and it works well. I am working on the next version of the module in which I add a new AdminController. The problem is that the new controller only works if I first uninstall and delete the first version of the module and then install this new version, if I do an update of the module the controllermis not found. Any ideas on why that happens? Do I have to register the new controller as it is done with hooks? Thanks in advance Link to comment Share on other sites More sharing options...
Prestashop Addict Posted October 22 Share Posted October 22 Please can you specify PS, PHP and theme versions Link to comment Share on other sites More sharing options...
mario5_fcb Posted October 22 Author Share Posted October 22 7 hours ago, Prestashop Addict said: Please can you specify PS, PHP and theme versions PS 1.7.8.11 PHP 7.4 the theme is not important becausethe controller is not visible, it just does a process and then does a redirect. this is how i get the controller url $url = $this->context->link->getAdminLink('ControlMIT') . '&order_id=' . $params['id_order']; and this is part or the admin controller class ControlMITController extends AdminController { public function initContent() { $order_id = (int) Tools::getValue('order_id'); $order = new Order($order_id); $url = $this->context->link->getAdminLink('AdminOrders'); $respuesta = $this->processMIT($order_id); if (!is_null($respuesta)) { $this->context->cookie->__set('redirect_message', $respuesta); } Tools::redirectAdmin($url); } public function processMIT($order_id) { //Some process } } and this is what i get Link to comment Share on other sites More sharing options...
Prestashop Addict Posted October 23 Share Posted October 23 If you are in a module you should extend ModuleAdminController 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