Skip to content

Commit

Permalink
[BUGFIX] normalizedParams for upgrade wizards
Browse files Browse the repository at this point in the history
Fixes: #460
  • Loading branch information
Achim Fritz committed Nov 17, 2023
1 parent 849dc57 commit 7b559d5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions Classes/Updates/ContainerDeleteChildrenWithWrongPid.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
use TYPO3\CMS\Core\Authentication\BackendUserAuthentication;
use TYPO3\CMS\Core\Core\Bootstrap;
use TYPO3\CMS\Core\Core\Environment;
use TYPO3\CMS\Core\Http\NormalizedParams;
use TYPO3\CMS\Core\Http\ServerRequestFactory;
use TYPO3\CMS\Core\Information\Typo3Version;
use TYPO3\CMS\Core\Utility\GeneralUtility;
Expand Down Expand Up @@ -83,6 +84,7 @@ public function executeUpdate(): bool
if ((GeneralUtility::makeInstance(Typo3Version::class))->getMajorVersion() > 11) {
$requestFactory = GeneralUtility::makeInstance(ServerRequestFactory::class);
$request = $requestFactory::fromGlobals();
$request = $request->withAttribute('normalizedParams', NormalizedParams::createFromRequest($request));
Bootstrap::initializeBackendUser(BackendUserAuthentication::class, $request);
} else {
Bootstrap::initializeBackendUser();
Expand Down
2 changes: 2 additions & 0 deletions Classes/Updates/ContainerMigrateSorting.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
use TYPO3\CMS\Core\Authentication\BackendUserAuthentication;
use TYPO3\CMS\Core\Core\Bootstrap;
use TYPO3\CMS\Core\Core\Environment;
use TYPO3\CMS\Core\Http\NormalizedParams;
use TYPO3\CMS\Core\Http\ServerRequestFactory;
use TYPO3\CMS\Core\Information\Typo3Version;
use TYPO3\CMS\Core\Utility\GeneralUtility;
Expand Down Expand Up @@ -70,6 +71,7 @@ public function executeUpdate(): bool
if ((GeneralUtility::makeInstance(Typo3Version::class))->getMajorVersion() > 11) {
$requestFactory = GeneralUtility::makeInstance(ServerRequestFactory::class);
$request = $requestFactory::fromGlobals();
$request = $request->withAttribute('normalizedParams', NormalizedParams::createFromRequest($request));
Bootstrap::initializeBackendUser(BackendUserAuthentication::class, $request);
} else {
Bootstrap::initializeBackendUser();
Expand Down

0 comments on commit 7b559d5

Please sign in to comment.