This forum has moved to a new location and is in read-only mode. Please visit talk.octobercms.com to access the new location.
Hi,
I'm having the following error in my code. What does it means?
List behavior has not been initialized, check that you have called makeLists() in your controller
Thanks
Hi,
Did you include that in your controller?
public $implement = [
'Backend\Behaviors\ListController',
];
Hi Crazymodder,
Yes i did, the following is my controller
public $implement = ['Backend\Behaviors\ListController',
'Backend\Behaviors\FormController'];
public $listConfig = [
'main' => 'config_list.yaml',
'list' => 'config_question_list.yaml'
];
public $formConfig = 'config_form.yaml';
public function __construct()
{
parent::__construct();
BackendMenu::setContext('Pwtan.Shop', 'Shop', 'add shop');
}
did you tried this?
inside the action on your controller just call $this->asExtension('ListController')->index(); like this: public function index($id=null){ $this->asExtension('ListController')->index(); } grettings!
I find out the problem, because it's redirected to /controller/name/index.htm
<?= $this->listRender() ?>
You should add data for this or comment out it, it will be fine.
Last updated
1-6 of 6