-
Notifications
You must be signed in to change notification settings - Fork 2
Description
After a composer update, the Visual Editor became unusable for us on TYPO3 14.2.x-dev.
Opening web_edit for a page caused an endless reload loop in the backend.
The relevant request was:
/typo3/module/web/edit?...&id=1&languages[0]=0
and it returned 406 Not Acceptable.
Environment
- TYPO3:
14.2.x-dev - extension:
friendsoftypo3/visual-editor^1.0(we had1.0.7) - site config uses a relative base:
base: / languages: - languageId: 0 base: /
What happens
The backend repeatedly reloads web/edit.
In the browser console/network we saw:
repeated navigation to /typo3/module/web/edit?...
406 on that request
then fallback navigation to /typo3/
Root causes we found
- Relative site base triggers wrong cross-origin handling
In Classes/Backend/Controller/PageEditController.php, iframeUrl() compares the generated frontend URI against the backend request origin.
With a relative site base (base: /), TYPO3 generates a relative URI without scheme/host.
That URI is currently treated as if it were a different origin, and the controller throws a 406 with a redirect script.
For us, treating relative URIs as same-origin fixes the reload loop.
Patch logic:
php
if (
($uri->getScheme() === '' && $uri->getHost() === '')
|| (
$uri->getScheme() === $request->getUri()->getScheme()
&& $uri->getHost() === $request->getUri()->getHost()
&& $uri->getPort() === $request->getUri()->getPort()
)
) {
return $uri;
}