octobercms/october · error · ApplicationException

Form record with an ID of :id could not be found.

Error message

Form record with an ID of :id could not be found.

What it means

Error "Form record with an ID of :id could not be found." thrown in octobercms/october.

Source

Thrown at modules/backend/behaviors/FormController.php:871

        $model = $this->controller->formCreateModelObject();

        // Prepare query and find model record
        $query = $model->newQuery();

        // Remove multisite restriction
        if ($this->controller->formHasMultisite($model)) {
            $query->withSites();
        }
        elseif ($this->controller->formHasMultisiteGroup($model)) {
            $query->withSiteGroups();
        }

        $this->controller->formExtendQuery($query);
        $result = $query->find($recordId);

        if (!$result) {
            throw new ApplicationException($this->getCustomLang('notFound', null, [
                'class' => get_class($model), 'id' => $recordId
            ]));
        }

        $result = $this->controller->formExtendModel($result) ?: $result;

        return $result;
    }

    /**
     * extendFormFields is a static helper for extending form fields
     * @deprecated for best performance, use Event class directly, see docs
     * @link https://docs.octobercms.com/4.x/extend/forms/form-controller.html#extending-form-fields
     */
    public static function extendFormFields($callback)
    {
        $calledClass = self::getCalledExtensionClass();
        Event::listen('backend.form.extendFields', function ($widget) use ($calledClass, $callback) {

View on GitHub (pinned to b608633a7e)

When it happens

Trigger: Thrown at modules/backend/behaviors/FormController.php:871 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/0d8567da55466eb3. Report an issue: GitHub.