This forum has moved to a new location and is in read-only mode. Please visit talk.octobercms.com to access the new location.

pwtan14262
pwtan14262

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

Crazymodder
Crazymodder

Hi,

Did you include that in your controller?

public $implement = [
    'Backend\Behaviors\ListController',
];
pwtan14262
pwtan14262

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');
}
Crazymodder
Crazymodder

Did your Controller extends Controller?

alberich205218618
alberich205218618

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!

issacnguyen.az63035
issacnguyen.az63035

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

You cannot edit posts or make replies: the forum has moved to talk.octobercms.com.