---
title: "Breaking: #97091 - TSFE->clear_preview has been removed"
manual: "TYPO3 Core Changelog"
version: "main"
permalink: "https://docs.typo3.org/permalink/changelog:breaking-97091"
source: "Changelog/12.0/Breaking-97091-TSFE-clear_previewHasBeenRemoved.rst"
typo3-version: "12.0"
typo3-major: 12
type: "breaking"
issue: 97091
forge: "https://forge.typo3.org/issues/97091"
tags: ["Frontend", "PHP-API", "PartiallyScanned", "ext:frontend"]
rendered: "2026-09-20T18:31:11+00:00"
---

# Breaking: #97091 - TSFE->clear_preview has been removed {#breaking-97091}

See [forge#97091](https://forge.typo3.org/issues/97091)

## Description {#description}

The method `clear_preview` of the `TypoScriptFrontendController` has been removed.

## Impact {#impact}

Calling the method will result in a PHP Fatal Error.

## Affected Installations {#affected-installations}

All installations calling the `clear_preview` method

## Migration {#migration}

Build your own `clear_preview` method:

```php
$context = GeneralUtility::makeInstance(Context::class);
$GLOBALS['SIM_EXEC_TIME'] = $GLOBALS['EXEC_TIME'];
$GLOBALS['SIM_ACCESS_TIME'] = $GLOBALS['ACCESS_TIME'];
$context->setAspect(
    'frontend.preview',
    GeneralUtility::makeInstance(PreviewAspect::class)
);
$context->setAspect(
    'date',
    GeneralUtility::makeInstance(
        DateTimeAspect::class,
        (new \DateTimeImmutable())->setTimestamp($GLOBALS['SIM_EXEC_TIME'])
    )
);
$context->setAspect(
    'visibility',
    GeneralUtility::makeInstance(VisibilityAspect::class)
);
```
