cant call getModel from controller - Joomla! Forum - community, help and support


i'm developing component joomla 3.x , i'm having problem jcontrollerlegacy getmodel. when try call within controller.php in dispaly function of class casehandlercontroller breaks execution no erorrs, blank page, if function undefined. same code works fine on local developement server on production server fails when making call. function below:

code: select all

        function display($cachable = false, $urlparams = false)
        {
            $this->configuration = getconfiguration();
            // set default view if not set
            $input = jfactory::getapplication()->input;
            $input->set('view', $input->getcmd('view', 'casehandler'));
            $view = $this->getview( $input->get('view'), 'html' );
            echo 'model:';
            $model = $this->getmodel('casehandler);
            echo 'model done.';
            $view->setmodel($model, true );
           
            $view->setlayout( 'default' );
            $view->display();
        }

model: gets ecchoed , model done. not. i've tried debug echoing lines inside model class no response either. calling getmodel() without arguments produces same result. problem here when exact same code runs fine on local server?

having debugged further echoing lines jcontrollerlegacy class inside getmodel function got hint $prefix variable displaying model name casehandlermodel instead of casehandlermodel, changed filename of model casehandler.php casehandler.php , fixed problem...





Comments

Popular posts from this blog

Warning, the Safe Path is not accessible vm3 - Joomla! Forum - community, help and support

uppercase letters in url - Joomla! Forum - community, help and support

Joomla! Update is not offering Joomla 3 - Joomla! Forum - community, help and support