Project

General

Profile

Actions

Bug #17948

closed

$tce->clear_cacheCmd fails

Added by Alex Tuveri over 16 years ago. Updated about 16 years ago.

Status:
Closed
Priority:
Should have
Assignee:
Category:
Content Rendering
Target version:
-
Start date:
2007-12-24
Due date:
% Done:

0%

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

Description

Hi according to TYPO3 Core APIs guide to clear FE cache I must to call
$tce->clear_cacheCmd('<value>')

this could be an integer or pages/all/temp_CACHED

when I attempt to use it from my extension (ttnews_feeder) and pass to it as parameter one or more pids all is fine, but when I run:

$tce->clear_cacheCmd('pages') from BE the extension is 'blocked'; TYPO3 can't access to any page (results in: page not found).

The error log reports this FATAL ERROR:

[Mon Dec 24 11:51:29 2007] [error] [client 195.210.65.21] PHP Fatal error: Call to a member function getTSConfigVal() on a non-object in /var/www/typo3_src-4.1.4/t3lib/class.t3lib_tcemain.php on line 6156, referer: http://www.bandamadrisio.it/typo3/alt_mod_frameset.php?fW=0&nav=/typo3/alt_db_navframe.php%3F&script=..%2Ftypo3conf%2Fext%2Fttnews_feeder%2Fmod1%2Findex.php&id=

If a numerica value (i tested if integer) is passed there are no problems; if passed the code above 'pages' all blocks.
(issue imported from #M7042)

Actions #1

Updated by Alex Tuveri over 16 years ago

I forgot -- the failure happens on

TYPO3 4.1.4 and TYPO3 4.1.5
PHP 5.2.X ->

(the errror doesn't appear under PHP 4.x).

Actions #2

Updated by Oliver Hader over 16 years ago

Please call the clear_cacheCmd like this:

$tce = t3lib_div::makeInstance('t3lib_TCEmain');
$tce->stripslashes_values = 0;
$tce->start(array(), array());
$tce->clear_cacheCmd('pages');

The "$tce->start(array(), array());" call sets the BE users in TCEmain.

Actions #3

Updated by Oliver Hader over 16 years ago

See the "TYPO3 Core Engine (TCE)" secion of the doc_core_api and search for "Example: Clearing cache". There the correct disposal is shown (as mentioned in my last note). Thus, no bug and im closing this issue.

Actions

Also available in: Atom PDF