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.
| Attachment | Size |
|---|---|
| cachefix.patch | 1011 bytes |

#1
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.
#2
#3
This was fixed a long time ago. :-)
#4
Automatically closed -- issue fixed for 2 weeks with no activity.