diff --git a/typo3/sysext/core/Documentation/Changelog/master/Breaking-83244-FluidWidgetLinksDoNotAddCacheHashParameterByDefaultAnymore.rst b/typo3/sysext/core/Documentation/Changelog/master/Breaking-83244-FluidWidgetLinksDoNotAddCacheHashParameterByDefaultAnymore.rst new file mode 100644 index 0000000000000000000000000000000000000000..18b59638d16f25048837c9c5307bc69ffcb9e348 --- /dev/null +++ b/typo3/sysext/core/Documentation/Changelog/master/Breaking-83244-FluidWidgetLinksDoNotAddCacheHashParameterByDefaultAnymore.rst @@ -0,0 +1,38 @@ +.. include:: ../../Includes.txt + +======================================================================================= +Breaking: #83244 - Fluid Widget Links do not add cacheHash parameter by default anymore +======================================================================================= + +See :issue:`83244` + +Description +=========== + +When using links for fluid widgets (like Paginator widgets) it is not possible to disable the cHash calculation. + +A new argument "useCacheHash" for the `<f:widget.link>` and the `<f:widget.uri>` ViewHelpers has been added +to re-enable the previous behaviour. + +Additionally, using cHash and addQueryString is counterproductive for deterministic caching purposes, +thus this combination should not be set by TYPO3 core by default. + + +Impact +====== + +Using the `<f:widget.link>` or `<f:widget.uri>` ViewHelper will not generate a cHash anymore. + + +Affected Installations +====================== + +Installations using extensions that are built around Fluid widgets. + + +Migration +========= + +None. If necessary, activate the cHash calculation by using the newly introduced Fluid argument "useCacheHash". + +.. index:: Fluid, NotScanned diff --git a/typo3/sysext/fluid/Classes/ViewHelpers/Widget/LinkViewHelper.php b/typo3/sysext/fluid/Classes/ViewHelpers/Widget/LinkViewHelper.php index d3841630ee60bfea87b5ccbb8832eb834bf2256e..c74c59df4634e87eddc6adb02e20726f95906304 100644 --- a/typo3/sysext/fluid/Classes/ViewHelpers/Widget/LinkViewHelper.php +++ b/typo3/sysext/fluid/Classes/ViewHelpers/Widget/LinkViewHelper.php @@ -49,6 +49,7 @@ class LinkViewHelper extends \TYPO3\CMS\Fluid\Core\ViewHelper\AbstractTagBasedVi $this->registerTagAttribute('rel', 'string', 'Specifies the relationship between the current document and the linked document'); $this->registerTagAttribute('rev', 'string', 'Specifies the relationship between the linked document and the current document'); $this->registerTagAttribute('target', 'string', 'Specifies where to open the linked document'); + $this->registerArgument('useCacheHash', 'bool', 'True whether the cache hash should be appended to the URL', false, false); $this->registerArgument('addQueryStringMethod', 'string', 'Method to be used for query string'); $this->registerArgument('action', 'string', 'Target action'); $this->registerArgument('arguments', 'array', 'Arguments', false, []); @@ -116,6 +117,7 @@ class LinkViewHelper extends \TYPO3\CMS\Fluid\Core\ViewHelper\AbstractTagBasedVi return $uriBuilder->reset() ->setArguments([$argumentPrefix => $arguments]) ->setSection($this->arguments['section']) + ->setUseCacheHash($this->arguments['useCacheHash']) ->setAddQueryString(true) ->setAddQueryStringMethod($this->arguments['addQueryStringMethod']) ->setArgumentsToBeExcludedFromQueryString([$argumentPrefix, 'cHash']) diff --git a/typo3/sysext/fluid/Classes/ViewHelpers/Widget/UriViewHelper.php b/typo3/sysext/fluid/Classes/ViewHelpers/Widget/UriViewHelper.php index f67fb33add01e81163236cd14c326f91525a1849..5ad45e4b8b0ae98cfee554bfac77d461914a58bc 100644 --- a/typo3/sysext/fluid/Classes/ViewHelpers/Widget/UriViewHelper.php +++ b/typo3/sysext/fluid/Classes/ViewHelpers/Widget/UriViewHelper.php @@ -44,6 +44,7 @@ class UriViewHelper extends AbstractViewHelper */ public function initializeArguments() { + $this->registerArgument('useCacheHash', 'bool', 'True whether the cache hash should be appended to the URL', false, false); $this->registerArgument('addQueryStringMethod', 'string', 'Method to be used for query string'); $this->registerArgument('action', 'string', 'Target action'); $this->registerArgument('arguments', 'array', 'Arguments', false, []); @@ -113,6 +114,7 @@ class UriViewHelper extends AbstractViewHelper return $uriBuilder->reset() ->setArguments([$argumentPrefix => $parameters]) ->setSection($arguments['section']) + ->setUseCacheHash($arguments['useCacheHash']) ->setAddQueryString(true) ->setAddQueryStringMethod($arguments['addQueryStringMethod']) ->setArgumentsToBeExcludedFromQueryString([$argumentPrefix, 'cHash'])