Commit e6e816cc authored by Stefan Bürk's avatar Stefan Bürk Committed by Oliver Bartsch
Browse files

[TASK] Cover FE index.php id/type parameter requests with tests

Core has been working with id and type as query
parameter to display FE pages and switch between
defined TypoScript page definitions. Speaking url
has been integrated for v9 through the new routing
feature to do it in a more determistic way as in
comparision to ext:realurl.

As there might be instances using id/type query
parameters for ajax call switches (and eventelly
for eid scrips) in the frontend, normalization has
been implemented to keep this option alive (#88028).

Recently there has been a try to fix a bug for so
some use cases, which broke this support (#94537).

For future it should be considered if it is possible
to drop this option in the future to free id/type
query arguments for instances in the frontend.

There a several issues in this area, for example
broken subfolder installation support and id/type
query parameter on a full speaking url overrule
it with selected id, which is not expected.

To validate that the test fails if support is
broken change in PageRouter following line (150):

$urlPath = str_replace($scriptName, '', $urlPath);


$urlPath = str_replace( '/' . $scriptName,
    '', $urlPath);

Build/Scripts/ -s functional \

This patch acts as pre-patche to fix these.

Resolves: #95096
Related: #95096
Releases: master, 10.4
Change-Id: Iff97f04d7bf7e7b2462425d830e0451a8d7a8686

Tested-by: core-ci's avatarcore-ci <>
Tested-by: Benni Mack's avatarBenni Mack <>
Tested-by: Oliver Bartsch's avatarOliver Bartsch <>
Reviewed-by: Benni Mack's avatarBenni Mack <>
Reviewed-by: Oliver Bartsch's avatarOliver Bartsch <>
parent 39d86ee8
......@@ -774,4 +774,53 @@ class SiteRequestTest extends AbstractTestCase
* @return array
public function checkIfIndexPhpReturnsShortcutRedirectWithPageIdAndTypeNumProvidedDataProvider(): array
$domainPaths = [
$queries = [
return $this->wrapInArray(
PermutationUtility::meltStringItems([$domainPaths, $queries])
* @param string $uri
* @test
* @dataProvider checkIfIndexPhpReturnsShortcutRedirectWithPageIdAndTypeNumProvidedDataProvider
public function checkIfIndexPhpReturnsShortcutRedirectWithPageIdAndTypeNumProvided(string $uri)
$this->buildSiteConfiguration(1000, 'https://website.local/')
$expectedStatusCode = 307;
$expectedHeaders = ['X-Redirect-By' => ['TYPO3 Shortcut/Mountpoint'], 'location' => ['https://website.local/en-welcome']];
$response = $this->executeFrontendSubRequest(
new InternalRequest($uri),
self::assertSame($expectedStatusCode, $response->getStatusCode());
self::assertSame($expectedHeaders, $response->getHeaders());
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment