[TYPO3-dev] Typo3 4.2 Cache Bug?
Oliver Hader
oliver at typo3.org
Tue Apr 29 11:25:38 CEST 2008
Hi Klaus,
Klaus Hinum schrieb:
> 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?
Hm, strange...
Could you please post a reduced variant of your abstract field which
fails? Do you have the PHP mbstring extension enabled (which overrides
e.g. substr() by mb_substr() - and all other string functions of course)?
olly
--
Oliver Hader
TYPO3 Core Team
More information about the TYPO3-dev
mailing list