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
Thrown by the Tailor Entries controller (formFindModelObject) when the requested record ID cannot be found in the database, even after including soft-deleted records via withTrashed(). It surfaces as an ApplicationException, meaning it produces a user-facing error page or AJAX error response rather than a system crash.
Source
Thrown at modules/tailor/controllers/Entries.php:727
$model = $model->withSites();
}
if ($this->isVersionMode()) {
$model = $model->withVersions();
}
if ($this->isDraftMode()) {
$model = $model->withDrafts();
}
else {
$model = $model->withSavedDrafts();
}
// Include deleted records
$model = $model->withTrashed()->find($recordId);
if (!$model) {
throw new ApplicationException(__("Form record with an ID of :id could not be found.", [
'class' => $this->modelInstance::class, 'id' => $recordId
]));
}
// Mimic parent method
$this->formExtendModel($model);
return $model;
}
/**
* formGetRedirectUrl
*/
public function formGetRedirectUrl($context = null, $model = null): string
{
if (post('close') || $this->isSectionSingular() || $context === 'delete') {
$url = 'tailor/entries/'.$this->activeSource->handleSlug;
}View on GitHub (pinned to b608633a7e)
Solutions
- Verify the record exists: check the listing in the Tailor backend section, or run php artisan tinker and query the entry table for that ID
- If the URL is stale (old bookmark, reopened tab), navigate back to the section list and open the record fresh
- In multisite setups, switch to the site node the record belongs to before editing it
- If records were deleted by a migration or import, restore the data or remove the outdated link
Defensive patterns
Strategy: validation
Validate before calling
// Before linking to an entry, confirm it exists (including trashed)
$exists = \Tailor\Models\EntryRecord::inSection('blog_post')
->withTrashed()
->whereKey($recordId)
->exists();
if (!$exists) {
// skip rendering / redirect to list
} Try / catch
try {
$model = $controller->formFindModelObject($recordId);
} catch (\ApplicationException $e) {
// Record was deleted elsewhere: redirect to the section list with a flash message
return \Redirect::to(backend_url('tailor/entries/' . $sectionHandle))->withFlashError($e->getMessage());
} Prevention
- Handle deleted-record ApplicationExceptions in custom backend controllers with a redirect to the listing
- Avoid persisting deep links to specific entry IDs; link via the section listing instead
- In multisite setups, verify the current site node matches the record's site before opening edit pages
When it happens
Trigger: Opening /backend/tailor/entries/update/{id} (or an AJAX handler like onSave, onCommitDraft, onRestore) with an ID that no longer exists; the record was hard-deleted in another tab or by another user; the URL was bookmarked with a stale ID; the record belongs to a different site in a multisite setup and is filtered out.
Common situations: Stale browser tab after the record was deleted elsewhere; double-submit after a delete; copied links to removed entries; multisite deployments where the record exists only on another site node; draft-mode URL quirks where the draft record id differs from the published record id.
Related errors
- The provided model class ":modelClass" for the recordfinder
- Repeater must specify either a "form" or "group" property fo
- Section handle [{$handle}] not found
- Global handle [{$handle}] not found
- Could not spawn from path [{$spawnPath}]
AI-assisted analysis of octobercms/october@b608633a7e (2026-08-21).
Data as JSON: /api/errors/3022e3a90432e3a9.
Report an issue: GitHub.