Bug #19003

double cache or no cache through cHash variants of the same URL

Added by Ronald Steiner over 11 years ago. Updated about 6 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
-
Target version:
-
Start date:
2008-06-23
Due date:
% Done:

0%

TYPO3 Version:
4.2
PHP Version:
5.0
Tags:
Complexity:
Is Regression:
No
Sprint Focus:

Description

These two links point to the same page:
(a) http://localhost/t3421/index.php?id=6&L=1
(b) http://localhost/t3421/index.php?id=6&L=1&cHash=b5e9312461
(a) is generated by the menu, (b) is generated by:
[code]
typolink.parameter.data = page:uid
typolink.additionalParams = &L=1
typolink.addQueryString = 1
typolink.addQueryString.exclude = L,id,cHash,no_cache
typolink.addQueryString.method = GET
typolink.useCacheHash = 1
typolink.no_cache = 0
[/code]
“useCacheHash” is necessary, cause addQueryString = 1 might carry additional params.
Result: Both URL addresses lead to two identical pages in the cache.
If RealURL is used the problem obviously is solved. Only one URL is generated and only one page is in the cache.

Another more anoying version of the problem:
If we have same scenario just with L=0 param the result is three URL addresses fort he same page:
(a) http://localhost/t3421/index.php?id=6
(b) http://localhost/t3421/index.php?id=6&L=0
(c) http://localhost/t3421/index.php?id=6&L=0&cHash=7fc4118ac9
Just as 2) version (a) and (b) are cached separately to version (c). So again there are two identical pages in the cache.
But this time the problem is not solved by installing RealURL. Only one URL is generated, but the cache is not cached at all.

This bug leads to no caching of all pages in the default language or double caching. Both is not desirable for performace

(issue imported from #M8793)


Related issues

Related to TYPO3 Core - Bug #17095: Typolink : cHash isn't created if there's no additionalParams Closed 2007-03-08
Related to TYPO3 Core - Bug #17002: cHash is not recreated on disposal in config.linkVars Closed 2007-02-17
Related to TYPO3 Core - Bug #17070: typolink: cHash corrupted due to linkVars Closed 2007-03-02

History

#1 Updated by Ronald Steiner over 11 years ago

This bug is related to bug 0005010 and bug 0005161 and bug 0005117

#2 Updated by Ronald Steiner over 11 years ago

The Sponsorship is when the bug is fixed in the core.

#3 Updated by Popy no-lastname-given over 11 years ago

The bug is that "http://localhost/t3421/index.php?id=6&L=1" is not a valid url, as there's no cHash

#4 Updated by Ronald Steiner over 11 years ago

might be, but http://localhost/t3421/index.php?id=6&L=1 is generated by the typo3 menu.
[code]
subpart_menu = HMENU
subpart_menu.entryLevel = 0
subpart_menu.1 = TMENU
subpart_menu.1 {
NO.allWrap = <li class="normal">|</li>
NO.stdWrap.htmlSpecialChars = 1
NO.target = page
ACT = 1
ACT.stdWrap.htmlSpecialChars = 1
ACT.allWrap = <li class="aktiv">|</li>
wrap = <ul id="menu">|</ul>
}
[/code]
So nothing special. and no cHash is generated here. Might be that the problem is in the TMENU, who knows. The L param is a linkVar for the language just as usual.

#5 Updated by Dmitry Dulepov over 11 years ago

Techincally, these URLs are completely different:

(a) http://localhost/t3421/index.php?id=6 [^]
(b) http://localhost/t3421/index.php?id=6&L=0 [^]

This one is a synonym for (b):
(c) http://localhost/t3421/index.php?id=6&L=0&cHash=7fc4118ac9

This happens because L is normally used in the condition. TYPO3 will have create different cached copies for pages with conditions. Therefore cHash in the (c) is not necessary. However it cannot be determined in FE. Or at least cannot be determined easily.

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

Well, I disagree, as "L" is not a core parameter (I mean, correctly handled by cHash management function)

The fact is that it work because of the Typoscript conditions generaly used to handle multilangages websites :)

#7 Updated by Ronald Steiner over 11 years ago

Hi Dmitry,

(b) http://localhost/t3421/index.php?id=6&L=0 [^] [^]

This one is a synonym for (b):
(c) http://localhost/t3421/index.php?id=6&L=0&cHash=7fc4118ac9 [^]

or at least it should be. In fact Typo3 caches both url's seperate.
If realUrl is installed it will not be cached at all.

greetings

Ron

#8 Updated by Ronald Steiner over 11 years ago

Hi there,

another experience with wrong cHash:

if you are on this page:
http://localhost/t3421/index.php?id=6&L=0&testvar=blub&cHash=7fc4118ac9

and you use a language switching link like described above:
[code]
typolink.parameter.data = page:uid
typolink.additionalParams = &L=1
typolink.addQueryString = 1
typolink.addQueryString.exclude = L,id,cHash,no_cache
typolink.addQueryString.method = GET
typolink.useCacheHash = 1
typolink.no_cache = 0
[/code]

The generated link url will be:
http://localhost/t3421/index.php?id=6&L=1&testvar=blub&cHash=7fc4118ac9

Notice: The cHash is NOT regenerated, it is just taken as it was before. So it is a wrong cHash!

This might be very close related to:
http://bugs.typo3.org/view.php?id=5010

I'm still hopeing this cHash bugs will be throughly reviewed and solved in Typo3 4.2.2 or 4.3.0

greetings

Ron

#9 Updated by Dmitry Dulepov over 9 years ago

This would be solved after my patch for 5117 comes to SVN

#10 Updated by Alexander Opitz over 6 years ago

  • Status changed from New to Needs Feedback
  • Target version deleted (0)

The issue is very old, does this issue exists in newer versions of TYPO3 CMS (4.5 or 6.1)?

#11 Updated by Alexander Opitz about 6 years ago

  • Status changed from Needs Feedback to Closed
  • Is Regression set to No

No feedback for over 90 days.

Also available in: Atom PDF