Page MenuHomePhabricator

"File name too long" errors when using File Cache in languages like Arabic and Chinese
Open, Needs TriagePublic


As explained in Manual:File cache#Limitations:

The file names of the cache files are determined by the according page titles. Depending on the language, which is used in the page titles, some characters in the file names will have to be encoded in order to make up a valid file name for the according file system. For languages like Arabic, Chinese and so on this may result in the follwing PHP warning:

PHP Warning: file_put_contents(cache/......html.gz): failed to open stream: File name too long in includes/cache/FileCacheBase.php on line 171

This is a known limitation.

But I haven't found a bug filed to say it's a *known* limitation. So let's use this to track that limitation.

Related Objects

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald TranscriptOct 19 2016, 8:37 PM

This may need to be resolved by using title hashes like in T66214 instead of page titles, or just use page ids.

Belze added a subscriber: Belze.Feb 12 2017, 7:18 PM
ahmad added a subscriber: ahmad.Mar 20 2020, 5:12 PM
Restricted Application added a subscriber: alanajjar. · View Herald TranscriptMar 20 2020, 5:12 PM
Shizhao moved this task from Backlog to MediaWiki core on the Chinese-Sites board.Mon, Jul 6, 1:16 AM