[Typo3] Hook "contentPostProc-all" in TSFE doesnt affect cached pages
michael at typo3.org
Thu Jun 2 00:55:19 CEST 2005
Did anybody test this? Is it a bug?
Christoph Singer wrote:
> I'm using Version 3.8.0
> I want to modify the whole page content after generation of a page.
> In class.tslib_fe.php I found the hook "contentPostProc-all" which is
> described in the source code as "Hook for post-processing of page
> content cached/non-cached".
> I made a script with a function that hooks into this place. The function
> modifies $GLOBALS['TSFE']->content.
> When I clear the FE cache and view a page the first time, the hooked
> function works: I see the modified page content.
> But when I reload the page in the browser, the UNmodified content is
> Most strange thing: After viewing the page for the first time after
> clearing the cache, I looked into the database an noticed that in
> cache_pages the right MODIFIED page content is stored. But when I reload
> the page, the unmodified content is shown and in cache_pages the
> unmodified content is stored!
> Can someone explain me whats going on?
> It seems that
> 1. The hooked function correctly modifies $GLOBALS['TSFE']->content,
> this correct modified content is shown (if the page is called the first
> time) and the modified content is even saved in cache_pages.
> 2. When the page is viewed a second time, the unmodified content is
> shown, even though in cache_pages there is the right modified content.
> And then this unmodified content is saved in cache_pages. Where does
> this unmodified content come from? Is it newly generated (bypassing the
> hook), or is it cached in another place? Why I don't get the content
> that is stored in cache_pages? Why the content in cache_pages gets
> Am I doing something wrong, e.g. does my hook function need to modify
> other things than just TSFE->content?
> Thanks for any tips,
Use a newsreader! Check out
More information about the TYPO3-english