[TYPO3-dev] problem with caching after change of the link parameters
Franz Holzinger
franz at fholzinger.com
Wed Mar 8 14:16:19 CET 2006
Hello,
I have made some changes to tt_products in the links so that they have
e.g. tx_ttproducts_pi1[product]=32 instead of the former tt_products=32 .
This problems happens with the latest version from TYPO3 CVS and TYPO3
3.8.1 as well.
I want to make the single view cachable. However now always the same
product is shown in the single view.
What can be the reason for this error?
BananaGuard Shop Example:
http://fholzinger.com/index.php?id=35
Sources at:
http://fholzinger.com/development/T3X_tt_products-2_4_8-z-200603081329.t3x
http://wiki.typo3.org/index.php/Ext_tt_products#Download (I have put it
into CVS)
from class.tx_ttproducts_pi1.php:
class tx_ttproducts_pi1 extends fhlibrary_pibase {
var $prefixId = 'tx_ttproducts_pi1'; // Same as class name
var $scriptRelPath = 'pi1/class.tx_ttproducts_pi1.php'; // Path to this
script relative to the extension dir.
var $extKey = TT_PRODUCTS_EXTkey; // The extension key.
...
var $pi_checkCHash = TRUE;
...
case 'SINGLE':
debug ($this->basket->itemArray, '$this->basket->itemArray',
__LINE__, __FILE__);
debug ($this->conf['NoSingleViewOnList'],
'$this->conf[\'NoSingleViewOnList\']', __LINE__, __FILE__);
if (count($this->basket->itemArray) ||
!$this->conf['NoSingleViewOnList']) {
debug ($theCode, 'set_no_cache in single view!! $theCode',
__LINE__, __FILE__);
$TSFE->set_no_cache();
}
$contentTmp=$this->products_display($theCode, $this->errorMessage,
$error_code);
break;
In this case the cache is used and this is correct now. However always
the same product comes from the cache now.
Strangle it does not even work if I call
TSFE->set_no_cache(). Also in this case the cache is used.
The former (working) version had the same code here.
>> case 'SINGLE':
>> if (count($this->basket->itemArray) ||
>> !$this->conf['NoSingleViewOnList']) {
>> $TSFE->set_no_cache();
>> }
>> $contentTmp=$this->products_display($theCode, $this->errorMessage,
>> $error_code);
>> break;
Only the names of the parameters in the links have been changed.
I have cleared all the caches from the backend and frontend. I click on
the two symbols 'Admin functions' in the backend. So the cache must be
cleared now. When I reload the single view page even with another
&tx_ttproducts_pi1[product]=4 paramter then always the same product is
shown in single view again and again.
Is this an error or did I miss something?
Regards,
Franz
More information about the TYPO3-dev
mailing list