You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Use setUpFrontendRootPage() and have at least a page with the rootPageId
Get the frontend response using $this->getFrontendResponse().
Additional information you would like to provide?
The TYPO3-CORE-SA-2023-003 denies requests to site URLs without matching site base. The getFrontendResponse() TF method invokes getFrontendResult() which sets up a very basic InternalRequest with the given page UID and an optional language uid:
With this the request URI will always be /?id=X&L=Y and thus not match the site base. In the mentioned example the InternalRequest URI is /?id=8&L=0 and does not match the /foo/ site base, /foo/?id=8&L=0 would be required.
This leads to the mentioned error. As a workaround the feature flag mentioned in the SA can be added to the functional test:
The text was updated successfully, but these errors were encountered:
mbrodala
changed the title
getFrontendResult() fails with TYPO3-CORE-SA-2023-003
getFrontendResult() fails with custom site base and TYPO3-CORE-SA-2023-003
Jul 27, 2023
What are you trying to achieve?
Invoking
getFrontendResponse()
in a functional test to verify some frontend output which contains a linkWhat do you get instead?
Tests now fail with an The page did not exist or was inaccessible. Reason: No site configuration found. error page.
How to reproduce the issue?
Have a functional test with a custom site with a custom
base
not being just/
:Example site:
Use
setUpFrontendRootPage()
and have at least a page with therootPageId
Get the frontend response using
$this->getFrontendResponse()
.Additional information you would like to provide?
The TYPO3-CORE-SA-2023-003 denies requests to site URLs without matching site
base
. ThegetFrontendResponse()
TF method invokesgetFrontendResult()
which sets up a very basicInternalRequest
with the given page UID and an optional language uid:testing-framework/Classes/Core/Functional/FunctionalTestCase.php
Lines 1496 to 1498 in c32fe20
With this the request URI will always be
/?id=X&L=Y
and thus not match the sitebase
. In the mentioned example theInternalRequest
URI is/?id=8&L=0
and does not match the/foo/
site base,/foo/?id=8&L=0
would be required.This leads to the mentioned error. As a workaround the feature flag mentioned in the SA can be added to the functional test:
Specify some data of the environment
The text was updated successfully, but these errors were encountered: