I'm developing a component for Joomla 3.x and I'm having a problem with JControllerLegacy getModel.
When I try to call it from within my controller.php in the display function of the class CasehandlerController it breaks execution with no errors, just a blank page, as if the function was undefined.
The exact same code works fine on my local developement server but on the production server it fails when making this call. The function is as below:
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');// closing single quote missing here
echo 'model done.';
$view->setModel($model, true );
$view->setLayout( 'default' );
$view->display();
}
"model:" gets echoed and "model done." does not.
I've tried to debug this by echoing lines from inside the model class but with no response from that either. Calling getModel() without arguments also produces the same result.
What could be the problem here when the exact same code runs fine on my local server?