Defenition cache not loaded

joostpluijmers - August 27, 2008 - 10:29
Project:HTML Purifier
Version:5.x-1.x-dev
Component:Code
Category:bug report
Priority:critical
Assigned:Unassigned
Status:closed
Description

When implementing htmlpurifier as a module on a multisite environment I encountered errors that the required library folder wasn't writable. Our security policies restrict writing in other environments than your own site for obvious reasons.

While debuging the code I found out that the packaged drupal defenition class wasn't used and the default serializer was used instead. Conform to the htmlpurifier documentation I set the "Cache.DefinitionImpl" configuration directive to "Drupal" inside the _htmlpurifier_get_config function.

This seems to have fixed the problem for me. Hope it helps.

AttachmentSize
cachefix.patch1011 bytes

#1

Owen Barton - October 9, 2008 - 00:03
Version:5.x-1.3» 5.x-1.x-dev

Agreed on the need for this patch - it is bad form for Drupal to be writing any files outside of the configured directory.

Here is a patch that uses the standard method for creating and testing directories. It also uses the files directory, rather than the tmp directory (this cache can be permanent) which is in line with other caches (imagecache, css aggregation etc). It keeps the 2 directory levels, in case htmlpurifier needs additional caches in the future.

AttachmentSize
300518.patch 1.39 KB

#2

Owen Barton - October 9, 2008 - 00:04
Assigned to:joostpluijmers» Anonymous

#3

ezyang - July 10, 2009 - 00:57
Status:needs review» fixed

This was fixed a long time ago. :-)

#4

System Message - July 24, 2009 - 01:00
Status:fixed» closed

Automatically closed -- issue fixed for 2 weeks with no activity.

 
 

Drupal is a registered trademark of Dries Buytaert.