Bug #17095

Typolink : cHash isn't created if there's no additionalParams

Added by Popy no-lastname-given almost 13 years ago. Updated over 8 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
Communication
Target version:
-
Start date:
2007-03-08
Due date:
% Done:

0%

TYPO3 Version:
4.0
PHP Version:
4.3
Tags:
Complexity:
Is Regression:
Sprint Focus:

Description

If the typolink is configured without additionalParams and without addQueryString, the cHash is not generated, even if we need it because of linkVars

File class.tslib_content.php, line 5219 :

if (substr($addQueryParams,0,1)!='&') {
$addQueryParams = '';
} elseif ($conf['useCacheHash']) {
$pA = t3lib_div::cHashParams($GLOBALS['TSFE']->linkVars.$addQueryParams);
$addQueryParams.= '&cHash='.t3lib_div::shortMD5(serialize($pA));
}

I propose this patch :

if (substr($addQueryParams,0,1)!='&') {
$addQueryParams = '';
}
if ($conf['useCacheHash'] && trim($GLOBALS['TSFE']->linkVars.$addQueryParams)) {
$pA = t3lib_div::cHashParams($GLOBALS['TSFE']->linkVars.$addQueryParams);
$addQueryParams.= '&cHash='.t3lib_div::shortMD5(serialize($pA));
}

(issue imported from #M5161)

class.tslib_content.php.diff View (604 Bytes) Administrator Admin, 2007-05-02 10:52


Related issues

Related to TYPO3 Core - Bug #17070: typolink: cHash corrupted due to linkVars Closed 2007-03-02
Related to TYPO3 Core - Bug #17002: cHash is not recreated on disposal in config.linkVars Closed 2007-02-17
Related to TYPO3 Core - Bug #19003: double cache or no cache through cHash variants of the same URL Closed 2008-06-23

History

#1 Updated by Popy no-lastname-given over 12 years ago

Patch file also resolve bug #0005117

#2 Updated by Popy no-lastname-given over 12 years ago

Did somebody read the patch and test it ?

#3 Updated by Sareen Millet almost 12 years ago

Hey Popy,

I did test the patch and it really helps some problem. But in the new Typo 4.15 again the cache is confusing and there must be some more bugs. - proper caching seams to be relly tough.

Sareen

#4 Updated by Popy no-lastname-given almost 11 years ago

Bug still exists in 4.2.6

It is sad that core source code is breaking my cache :/

#5 Updated by Rik Willems about 10 years ago

Hi Popy,
While searching for this problem I read your issue. Soon I found the following in the typoscript documentation that at least solved my problem:

typolink.useCacheHash = 1

Greets!

#6 Updated by Popy no-lastname-given over 9 years ago

Reminder : Bug still present in latests releases (v4.1, 4.2, 4.3).

I can build new pacth file if needed and if it has a chance to be taken in account.

#7 Updated by Popy no-lastname-given over 9 years ago

Patch included in #17070

#8 Updated by Mathias Schreiber over 9 years ago

still valid?

#9 Updated by Popy no-lastname-given over 9 years ago

Fixed in #17070

#10 Updated by Steffen Kamper over 9 years ago

fixed in #17070

#11 Updated by Popy no-lastname-given about 9 years ago

Bug remain in trunk

#12 Updated by Popy no-lastname-given about 9 years ago

Sorry, wasn't looking the good svn repository...

#13 Updated by Jo Hasenau almost 9 years ago

So is it still valid or can it be closed?

#14 Updated by Ernesto Baschny almost 9 years ago

No further feedback, so I consider it as closed.

#15 Updated by Susanne Moog over 8 years ago

  • Target version deleted (4.5.0)

Also available in: Atom PDF