---
title: "Deprecation: #97544 - Preview URI Generation related functionality in BackendUtility"
manual: "TYPO3 Core Changelog"
version: "main"
permalink: "https://docs.typo3.org/permalink/changelog:deprecation-97544"
source: "Changelog/12.0/Deprecation-97544-PreviewURIGenerationRelatedFunctionalityInBackendUtility.rst"
typo3-version: "12.0"
typo3-major: 12
type: "deprecation"
issue: 97544
forge: "https://forge.typo3.org/issues/97544"
tags: ["Backend", "Frontend", "PHP-API", "FullyScanned", "ext:backend"]
rendered: "2026-09-18T17:00:34+00:00"
---

# Deprecation: #97544 - Preview URI Generation related functionality in BackendUtility {#deprecation-97544}

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

## Description {#description}

With [forge#91123](https://forge.typo3.org/issues/91123) the `PreviewUriBuilder` has been introduced.
To further streamline any preview URI generation code, the related
functionality has now been fully integrated into `PreviewUriBuilder`
along with two new PSR-14 events. Therefore, the previously used
`BackendUtility::getPreviewUrl()` method, as well as the related hook
`$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_befunc.php']['viewOnClickClass']`,
has been deprecated.

## Impact {#impact}

Using the utility method or registering hooks will trigger a PHP `E_USER_DEPRECATED` error.
The extension scanner will detect usages.

## Affected installations {#affected-installations}

All installations using the utility method or the hook in custom extensions.

## Migration {#migration}

Migrate any usage of `BackendUtility::getPreviewUrl()` to
`PreviewUriBuilder->buildUri()`.

Replace any `$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_befunc.php']['viewOnClickClass']`
hook by using the new [PSR-14 events](https://docs.typo3.org/permalink/changelog:feature-97544).
The `BeforePagePreviewUriGeneratedEvent` can be used as replacement for
the hooks' `preProcess()` method, while the `AfterPagePreviewUriGeneratedEvent`
can be used as replacement for the hooks' `postProcess()` method.
