JeroenDeDauw / GitHub

MediaWiki extension that allows embedding the content of files hosted in GitHub git repositories
https://professional.wiki/
Other
32 stars 20 forks source link

HTMLPurifier cache directory not configurable #45

Open cboltz opened 7 years ago

cboltz commented 7 years ago

I noticed several lines like this in my error_log:

PHP Warning: Directory /usr/share/mediawiki_1_27/extensions/GitHub/vendor/ezyang/htmlpurifier/library/HTMLPurifier/DefinitionCache/Serializer not writable, please alter file permissions in /usr/share/mediawiki_1_27/extensions/GitHub/vendor/ezyang/htmlpurifier/library/HTMLPurifier/DefinitionCache/Serializer.php on line 2990

Directories in /usr/ are intentionally read-only - and shared between multiple wikis, so I won't change that.

It would be a good idea to make the cache directory configurable, maybe let it default to (a subdirectory of?) $wgCacheDirectory or at least add a way to silence this warning.

CC @ccboltz

kghbln commented 7 years ago

Thanks for reporting.

JeroenDeDauw commented 7 years ago

Yeah good point. I suppose just disabling this cache would already suffice, as it is not really needed in the first place. Patches that disable the cache, move its default location to wgCacheDirectory or make it configurable (with sane default) are all welcome.

kghbln commented 5 years ago

I believe allowing to make the directory configurable will be a great improvement.