After updating the site code with drush up -y I no longer can access text format configuration pages. The following error is logged:

PHP Fatal error: Class 'HTMLPurifier_Printer_ConfigForm' not found in /www/drupal/sites/all/modules/htmlpurifier/htmlpurifier.module on line 539

Comments

heddn’s picture

What version of HTMLPurifier upstream are you using? 4.5 or 4.4?

akamaus’s picture

I tested with both. The error stays the same.

sitekick’s picture

just ran into this situation. it gave me the 7.x-2.x-dev version when I ran drush pm-update htmlpurifier I uninstalled htmlpurifier then drush pm-download htmlpurifier for the 7.x-1.0 version. Then that error went away

heddn’s picture

I had sometime to investigate today. The reason for the no class found error is because the dry run on line 531 didn't have any text to dry run with. So, lets give it some... Try this patch on for size.

heddn’s picture

Status: Active » Needs review
roadran422’s picture

After applying this patch, "htmlpurifier-HTMLPurifier_Printer_ConfigForm-not-found-1962328-4.patch" from the poster above. I get this error
Fatal error: require_once() [function.require]: Failed opening required 'sites/all/modules/htmlpurifier/DefinitionCache.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/tpol/public_html/website.cc/sites/all/modules/htmlpurifier/htmlpurifier.module on line 144

Upon renaming "DefinitionCache.php" on line 144 to "HTMLPurifier_DefinitionCache_Drupal.php" gives me this error
Fatal error: require_once() [function.require]: Failed opening required 'HTMLPurifier/DefinitionCache.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/tpol/public_html/website.cc/sites/all/modules/htmlpurifier/HTMLPurifier_DefinitionCache_Drupal.php on line 6

Lastly, upon renaming "DefinitionCache.php" on line 6 to "HTMLPurifier_DefinitionCache_Drupal.php" gives me this error

Fatal error: require_once() [function.require]: Failed opening required '/HTMLPurifier/HTMLPurifier_DefinitionCache_Drupal.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/tpol/public_html/website.cc/sites/all/modules/htmlpurifier/HTMLPurifier_DefinitionCache_Drupal.php on line 6

heddn’s picture

Status: Needs review » Postponed (maintainer needs more info)

DefinitionCache.php is a file from upstream in the library. It isn't bundled within the Drupal module. Is the library in sites/all/libraries (or equivalent) and are file permissions appropriately set? Check the site status report to confirm the library is correctly configured and report back to us.

proweb.ua’s picture

#4 works for me

heddn’s picture

Status: Postponed (maintainer needs more info) » Closed (fixed)