[TYPO3-dev] About empty cHash
Steffen Kamper
steffen at sk-typo3.de
Tue Feb 19 18:15:57 CET 2008
Hi Francois,
"Francois Suter" <fsuter at cobweb.ch> schrieb im Newsbeitrag
news:mailman.1.1203440970.4796.typo3-dev at lists.netfielders.de...
> Hi all,
>
> I have made an extension which relies on 2 plugins (it's vge_tagcloud).
> The first plugin (pi1) builds a tag cloud, the second (pi2) displays a
> list of pages related to each keyword. The keyword and the related pages'
> uid are passed as piVars in the URL pointing to the page where pi2 is
> located.
>
> pi2 is a cached USER object and has $pi_checkCHash = true;
>
> However this is apparently not sufficient to avoid the empty cHash
> problem. As far as I understand (after re-reading The mysteries of cHash
> and looking around the mailing lists), this is because the cHash of the
> links are not stored in the cache table. The reason - as I understand it -
> is because the links are generated in pi1 but point to pi2. The links are
> generated inside a stdWrap property inside pi1, which means I'm not
> calling some of the tslib_pibase methods where one can tell that the cHash
> should be stored.
that's new to me. cHash is added automatic if the link target is cached. If
you link to a INT-Object there is no cHash calculated.
If you are in pi1 and want to use links for pi2 you can use a simple trick:
$this->prefixId = 'tx_myext_pi2';
...(do pi_linkTP) ...
$this->prefixId = 'tx_myext_pi1';
>
> One solution I found is to set to true the property useCacheHash of the
> typolink, but this means I have the cHash in the URL, which I would rather
> avoid. Is there any way around this?
>
setting this in typolink will force to calculate a cHash. But if target is
not cached it's nonsense.
vg Steffen
More information about the TYPO3-dev
mailing list