edmundk Posted July 19, 2012 Report Share Posted July 19, 2012 Warning : call_user_func_array() expects parameter 1 to be a valid callback, class 'Mcars' does not have a method 'index' in /home/*****/public_html/*****/core/classes/MainController.class.php on line 218 Does anyone have any ideas? I got this error when writing my module. BTW it's for the Admin Center... Thanks, Edmund K. Quote Link to comment Share on other sites More sharing options...
Moderators Kyle Posted July 19, 2012 Moderators Report Share Posted July 19, 2012 Edmund, The reason why of the error is that you don't have a function for the index. It's the way how module works, say you made a module called SomethingAdmin, and you type in the url with the SomethingAdmin, it will go directly to the index. If you have a different function, you can put this something like SomethingAdmin/itsnotindex. Examples... public function index() { //Its index! } public function itsnotindex() { //Its not index! } If you want more info. There's an example in the docs. -> http://forum.phpvms.net/page/index.html/_/developers-guides/creating-modules-and-add-ons-r25 Cheers! 1 Quote Link to comment Share on other sites More sharing options...
edmundk Posted July 19, 2012 Author Report Share Posted July 19, 2012 Thanks Kyle. Your help is always speedy and reliable! - Edmund K. Quote Link to comment Share on other sites More sharing options...
Moderators Kyle Posted July 19, 2012 Moderators Report Share Posted July 19, 2012 Not a problem! 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.