octobercms/october · error · ApplicationException

backend::lang.list.behavior_not_ready

Error message

backend::lang.list.behavior_not_ready

What it means

listRender throws the localized backend::lang.list.behavior_not_ready error when $this->listWidgets is empty, meaning the list behavior was never initialized (makeLists didn't run) before the view called listRender().

Solutions

  1. Use listRender only in views of actions that run the ListController behavior
  2. Verify the controller's index action initializes lists (makeLists) before rendering
  3. Check that $implement includes ListController and list definitions are valid
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at modules/backend/behaviors/ListController.php:423 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of octobercms/october@b608633a7e (2026-08-21). Data as JSON: /api/errors/4c8a74ec6ec0fcbd. Report an issue: GitHub.

Appendix: source

Thrown at modules/backend/behaviors/ListController.php:423

    /**
     * createModel is an internal method used to prepare the list model object.
     * @return \October\Rain\Database\Model
     */
    protected function createModel()
    {
        return App::make($this->config->modelClass);
    }

    /**
     * listRender renders the widget collection.
     * @param  string $definition Optional list definition.
     * @return string Rendered HTML for the list.
     */
    public function listRender($definition = null)
    {
        if (!count($this->listWidgets)) {
            throw new ApplicationException(Lang::get('backend::lang.list.behavior_not_ready'));
        }

        if (!$definition || !isset($this->listDefinitions[$definition])) {
            $definition = $this->primaryDefinition;
        }

        $vars = [
            'toolbar' => null,
            'filter' => null,
            'list' => null,
        ];

        if (isset($this->toolbarWidgets[$definition])) {
            $vars['toolbar'] = $this->toolbarWidgets[$definition];
        }

        if (isset($this->filterWidgets[$definition])) {
            $vars['filter'] = $this->filterWidgets[$definition];

View on GitHub (pinned to b608633a7e)