Skip to content
Snippets Groups Projects
Commit 00decdf5 authored by Benni Mack's avatar Benni Mack
Browse files

[BUGFIX] Revert "Remove prefixed scriptName from urlPath in PageRouter"

This reverts commit e2e59fb3 due
to certain incompatibilities with direct "index.php" calls in
certain server setups.

Change-Id: I980feb08f3a507d51ad059763748ee64752aa9a3
Resolves: #94968
Reverts: #94537
Releases: master, 10.4, 9.5
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/70694


Tested-by: default avatarcore-ci <typo3@b13.com>
Tested-by: default avatarAndreas Fernandez <a.fernandez@scripting-base.de>
Tested-by: default avatarStefan Bürk <stefan@buerk.tech>
Tested-by: default avatarBenni Mack <benni@typo3.org>
Reviewed-by: default avatarAndreas Fernandez <a.fernandez@scripting-base.de>
Reviewed-by: default avatarStefan Bürk <stefan@buerk.tech>
Reviewed-by: default avatarBenni Mack <benni@typo3.org>
parent d9c23004
No related merge requests found
...@@ -147,7 +147,7 @@ class PageRouter implements RouterInterface ...@@ -147,7 +147,7 @@ class PageRouter implements RouterInterface
if ($normalizedParams instanceof NormalizedParams) { if ($normalizedParams instanceof NormalizedParams) {
$scriptName = ltrim($normalizedParams->getScriptName(), '/'); $scriptName = ltrim($normalizedParams->getScriptName(), '/');
if ($scriptName !== '' && strpos($urlPath, $scriptName) !== false) { if ($scriptName !== '' && strpos($urlPath, $scriptName) !== false) {
$urlPath = str_replace('/' . $scriptName, '', $urlPath); $urlPath = str_replace($scriptName, '', $urlPath);
} }
} }
} }
......
...@@ -94,17 +94,11 @@ class PageTypeDecoratorTest extends AbstractEnhancerSiteRequestTest ...@@ -94,17 +94,11 @@ class PageTypeDecoratorTest extends AbstractEnhancerSiteRequestTest
) )
) )
; ;
$testSets = array_merge( $testSets = array_merge(
$testSets, $testSets,
[ [$testSetForPageContainingIndexInSlug->describe() => [$testSetForPageContainingIndexInSlug]]
$testSetForPageContainingIndexInSlug->describe() => [
$testSetForPageContainingIndexInSlug,
],
],
); );
} }
return $testSets; return $testSets;
} }
......
...@@ -126,16 +126,6 @@ class Builder ...@@ -126,16 +126,6 @@ class Builder
'menu.json' => 10, 'menu.json' => 10,
], ],
]; ];
$multipleTypesConfigurationDotPhp = [
'type' => 'PageType',
'default' => '.php',
'index' => 'index',
'map' => [
'.php' => 0,
'menu.json' => 10,
'.xml' => 20
],
];
return [ return [
PageTypeDeclaration::create('null ".html"') PageTypeDeclaration::create('null ".html"')
...@@ -166,15 +156,6 @@ class Builder ...@@ -166,15 +156,6 @@ class Builder
->withGenerateParameters(['&type=0']) ->withGenerateParameters(['&type=0'])
->withResolveArguments(['pageType' => 0]) ->withResolveArguments(['pageType' => 0])
->withVariables(Variables::create(['pathSuffix' => '/', 'index' => ''])), ->withVariables(Variables::create(['pathSuffix' => '/', 'index' => ''])),
PageTypeDeclaration::create('null ".php"')
->withConfiguration($multipleTypesConfigurationDotPhp)
->withResolveArguments(['pageType' => 0])
->withVariables(Variables::create(['pathSuffix' => '.php', 'index' => 'index'])),
PageTypeDeclaration::create('0 ".php"')
->withConfiguration($multipleTypesConfigurationDotPhp)
->withGenerateParameters(['&type=0'])
->withResolveArguments(['pageType' => 0])
->withVariables(Variables::create(['pathSuffix' => '.php', 'index' => 'index'])),
]; ];
} }
......
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