Modular Extensions Notices and errors

Derek Jones edited this page Jul 5, 2012 · 12 revisions
Clone this wiki locally

Category:Library::HMVC

If you are new to the Modular Extensions HMVC library you might get some error-messages or notices that you don't understand. This page may provide some clues.

Modules output stops working after upgrade from 4.0 If your module seems to stop working after updating to latest 4.2.x version, check this and remove the return first.

return $this->load->view('partial', $data)

Fatal error: Call to undefined method Modules::method() in (...)modules_helper.php on line 210 'Modules' is a reserved word in Modular Extensions, so you cannot define your own class as 'Modules'.

Undefined property: YourController::some_method() after loading CI library CodeIgniter assigns the last controller loaded as the value for get_instance, and CI_Loader uses get_instance to load system libraries, it is necessary to load system libraries in your module controller constructor to avoid this problem.

[b]An Error Was Encountered

Unable to load your default controller. Please make sure the controller specified in your Routes.php file is valid.[/b]

If you are trying to access at your module using something like "http://mydomain/folder/index.php/mymodule", to call the default controller, you could get the message above.

If you want to load a default controller from a module then it must have the same name as the module directory.