Bug #90783
closedUriBuilder ignores useCacheHash set to false
0%
Description
In the current form, I can't build a simple page uri with some params and WITHOUT a cHash. When I set useCacheHash to false, the generated typolink config won't hold any useCacheHash property. The property is only set to 1, but not to 0. See: https://forge.typo3.org/projects/typo3cms-core/repository/revisions/v9.5.14/entry/typo3/sysext/extbase/Classes/Mvc/Web/Routing/UriBuilder.php#L751
When I set useCacheHash to false, the config should change accordingly.
Updated by B. Kausch over 4 years ago
The cHash is always created. The useCacheHash prop is ignored. Why? I don't need a cHash for simple get parameters...
Updated by Susanne Moog over 4 years ago
- Status changed from New to Needs Feedback
Can you provide a bit more context about the code you are trying to use? If you use the UriBuilder directly and call setUseCacheHash with false, the setting is not added to the typolink configuration at all and as far as I can see that amounts to false in this case.
Additionally, for "simple get vars" the chance is high, that you either need a cHash, a corresponding routing configuration or the setting "exclude from cHash calculation" to make it work completely. Do your get parameters change what is displayed on the page?
Updated by B. Kausch over 4 years ago
Yeah. You can close the issue... I had to exclude the param from cHash calculation via TYPO3_CONF_VARS. But I have to admit, that the documentation of the useCacheHash prop (https://docs.typo3.org/m/typo3/reference-typoscript/master/en-us/Functions/Typolink.html#usecachehash) is very ambiguous about this. It says: "If set, the additionalParams list is exploded and calculated into a hash string appended to the URL [...]" But even if not set the cHash is calculated. You should make that more clear!
Updated by Susanne Moog over 4 years ago
- Status changed from Needs Feedback to Closed
Thanks for the feedback, I opened a new issue in the documentation project to better explain the setting, see https://github.com/TYPO3-Documentation/TYPO3CMS-Reference-Typoscript/issues/293