octobercms/october · error · SystemException

Site [{$siteId}] not found.

Error message

Site [{$siteId}] not found.

What it means

Error "Site [{$siteId}] not found." thrown in octobercms/october.

Source

Thrown at modules/backend/widgets/form/HasTranslatable.php:140

                $currentLocale = Site::getEditSite()->hard_locale ?? null;
                $sites = $sites->filter(fn($site) => $site->hard_locale !== $currentLocale);
            }
        }

        return $this->translatableSitesCache[$cacheKey] = $sites->values();
    }

    /**
     * getTranslatableSite returns a single site definition by ID
     */
    protected function getTranslatableSite($siteId)
    {
        $sites = Site::listEditEnabled();

        $site = $sites->first(fn($site) => $site->id == $siteId);

        if (!$site) {
            throw new SystemException("Site [{$siteId}] not found.");
        }

        return $site;
    }

    /**
     * getTranslatableSiteModel returns the model for a specific site context
     */
    protected function getTranslatableSiteModel($model, $site)
    {
        if (!method_exists($model, 'isClassInstanceOf')) {
            return $model;
        }

        // Model isn't populated likely from saving context
        if (!$model->exists && ($modelId = post('model_id'))) {
            $model = $model->newQuery()->find($modelId) ?: $model;
        }

View on GitHub (pinned to b608633a7e)

When it happens

Trigger: Thrown at modules/backend/widgets/form/HasTranslatable.php:140 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/cf0347a9b42cd3af. Report an issue: GitHub.