Skip to content

Commit

Permalink
Bugfix fix pagebrowser viewhelper
Browse files Browse the repository at this point in the history
  • Loading branch information
hannesbochmann committed Nov 7, 2023
1 parent 07db26a commit 4f38da2
Showing 1 changed file with 6 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

use Sys25\RnBase\ExtBaseFluid\ViewHelper\PageBrowserViewHelper;
use Sys25\RnBase\Utility\Arrays;
use TYPO3\CMS\Core\Utility\GeneralUtility;
use TYPO3\CMS\Extbase\Mvc\Web\Routing\UriBuilder;

/***************************************************************
Expand Down Expand Up @@ -136,7 +137,7 @@ public function render()
$additionalParams = Arrays::mergeRecursiveWithOverrule($additionalParams, $pageBrowserParams);

/* @var UriBuilder $uriBuilder */
$uriBuilder = $this->renderingContext->getControllerContext()->getUriBuilder();
$uriBuilder = GeneralUtility::makeInstance(UriBuilder::class);
$uriBuilder
->reset()
->setTargetPageType($pageType)
Expand All @@ -146,9 +147,11 @@ public function render()
->setArguments($additionalParams)
->setCreateAbsoluteUri($absolute)
->setAddQueryString($addQueryString)
// @see https://forge.typo3.org/issues/88209
->setAddQueryStringMethod('GET')
->setArgumentsToBeExcludedFromQueryString($argumentsToBeExcludedFromQueryString);
if (is_callable([$uriBuilder, 'setAddQueryStringMethod'])) {
// @see https://forge.typo3.org/issues/88209
$uriBuilder->setAddQueryStringMethod('GET');
}
if (method_exists($uriBuilder, 'setUseCacheHash')) {
$uriBuilder->setUseCacheHash(!$noCacheHash);
}
Expand Down

0 comments on commit 4f38da2

Please sign in to comment.