Project

General

Profile

Actions

Bug #90783

closed

UriBuilder ignores useCacheHash set to false

Added by B. Kausch almost 4 years ago. Updated almost 4 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
Extbase
Target version:
Start date:
2020-03-19
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
9
PHP Version:
Tags:
Complexity:
easy
Is Regression:
Sprint Focus:

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.

Actions #1

Updated by B. Kausch almost 4 years ago

The cHash is always created. The useCacheHash prop is ignored. Why? I don't need a cHash for simple get parameters...

Actions #2

Updated by Susanne Moog almost 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?

Actions #3

Updated by B. Kausch almost 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!

Actions #4

Updated by Susanne Moog almost 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

Actions

Also available in: Atom PDF