Issue Bug Under Review

#108473TYPO3\CMS\Backend\Routing\UriBuilder::buildUriFromRoute doesn't respect if $GLOBALS['TYPO3_CONF_VARS']['BE']['entryPoint'] contains a domain

Sebastian Fischer 12/11/25, 19:42 updated 11/09/26, 09:08

Description

In case if $GLOBALS[‘TYPO3_CONF_VARS’][‘BE’][‘entryPoint’] contains a domain to make the backend accessible via an own domain this is lost in the link generation.

Precondition to understand the problem:
- the backend is accessible via https://backend.dev14.ddev.site/
- the frontend is accessible via https://www.dev14.ddev.site/
- typo3/cms-adminpanel is visible in the frontend.

When I want to open the adminpanel and ajax request to /ajax/adminpanel/toggleActiveState?token=f99d26618a037279563e9dbf02c5a936a16eff2f36801e1245788b1db0a530de is made.

This is answered with a 404 error, because /ajax/adminpanel/toggleActiveState is not available. This is a backend ajax route that is missing the domain of the backend.

The url generated for the ajax route is generated with TYPO3\CMS\Backend\Routing\UriBuilder::buildUriFromRoute which calls UriBuilder::buildUri

In buildUri the $requestContext is gathered via TYPO3\CMS\Core\Routing\RequestContextFactory::fromBackendRequest which calls TYPO3\CMS\Core\Routing\BackendEntryPointResolver::getPathFromRequest.

In getPathFromRequest the correct $entryPoint is found BUT only the path of that is used.

I think it would be better if RequestContextFactory::fromBackendRequest would use BackendEntryPointResolver::getUriFromRequest instead. Which would result in https://backend.dev14.ddev.site/ajax/adminpanel/toggleActiveState?token=f99d26618a037279563e9dbf02c5a936a16eff2f36801e1245788b1db0a530de with the host instead of only resulting in /ajax/adminpanel/toggleActiveState?token=f99d26618a037279563e9dbf02c5a936a16eff2f36801e1245788b1db0a530de without the host.

Reviews 2

History 29