octobercms/october · error · October\Rain\Exception\ApplicationException
There is no page that uses the necessary component
Error message
There is no page that uses the necessary component
What it means
Guard in PreviewController::onPreview: no CMS page in the active theme contains the component required to display this Tailor record (getPreviewPageName returned null). The site owner must create/configure a page using the record's component before preview can work.
Solutions
- Add the blueprint's component to a CMS page in the active theme
- Set an explicit preview page name for the controller
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at modules/tailor/behaviors/PreviewController.php:63 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/8ef36a0d92d8f7e3.
Report an issue: GitHub.
Appendix: source
Thrown at modules/tailor/behaviors/PreviewController.php:63
* setPreviewPageContext
*/
public function setPreviewPageContext(string $componentName, Blueprint $activeSource)
{
$this->componentName = $componentName;
$this->activeSource = $activeSource;
}
/**
* onPreview previews the record
*/
public function onPreview($recordId = null)
{
if (!System::hasModule('Cms')) {
throw new ApplicationException('Cannot preview without the CMS module installed!');
}
if (!$pageName = $this->getPreviewPageName()) {
throw new ApplicationException('There is no page that uses the necessary component');
}
// Get model from page action
$model = $this->controller->formGetModel();
// Update the record for preview
$this->performSaveOnModel(
$model,
$this->controller->formGetWidget()->getSaveData(),
$this->controller->formGetWidget()->getSessionKey()
);
// A preview page is already open
if ($existingToken = post('preview_token')) {
return [
'token' => $existingToken,
];
}View on GitHub (pinned to b608633a7e)