[TYPO3-dev] Typo3 4.2 Cache Bug?

Klaus Hinum k_hinum at hotmail.com
Mon Apr 28 18:08:48 CEST 2008


Klaus Hinum schrieb:
> Dmitry Dulepov [typo3] schrieb:
>> Klaus Hinum wrote:
>>> I just stumbled upon an error (or missing feature ;)) of the page 
>>> cache in typo3 4.2. It looks like the cache writing is aborted when 
>>> it comes to special chars (or html entities).
>>
>> It means that charset of corresponding database field ("html" if I 
>> remember correctly) in cache_pages does not correspond to the BE 
>> charset. So MySQL cannot save your data fully. It tries but finds that 
>> data is incompatible with column charset and aborts writing in the 
>> middle.
>>
> 
> Thanks for the fast reply but both (backend and the database, also the 
> html field) are set to UTF-8. The html field is (as most other fields, 
> some are utf8_bin) utf8_general_ci.
> 
> Greetings
> Klaus

After some more research, I found out the true problem.
We use some HTML tags in our abstract field, like <b> and <a>. For our 
pageteaser we use the PHP substr() method to shorten the abstract for 
teasing. It looks like there is a problem with 4.2 (did work with 4.1.5) 
when caching the resulting pageteaser page, as it will abort inbetween 
the shortened abstract. When adding strip_tags() before using substr() 
everything works.

At least an error should be written in the cache entry, as it may be 
hard to find (took me some hours today).

Any idea what this causes?

Greetings
Klaus




More information about the TYPO3-dev mailing list