Jump to content

Class 'HTMLPurifier_Config' not found - 1.6.0.14


Recommended Posts

Dear Users!

 

I've found some strange problem with HTML Purifier. After disabling it some time ago I am unable to enable it again.

Dev mode is active and it shows:

 

Fatal error: Class 'HTMLPurifier_Config' not found in "/classes/Tools.php on line 3267"

 

But Tools.php looks complete (original one):

If I get back to "General" section I can see that HP is enabled which is strange too.

if ($purifier === null)
{
$config = HTMLPurifier_Config::createDefault(); //line 3267


// Set some HTML5 properties
$config->set('HTML.DefinitionID', 'html5-definitions'); // unqiue id
$config->set('HTML.DefinitionRev', 1);


$config->set('Attr.EnableID', true);
$config->set('HTML.Trusted', true);
$config->set('Cache.SerializerPath', _PS_CACHE_DIR_.'purifier');
$config->set('Attr.AllowedFrameTargets', array('_blank', '_self', '_parent', '_top'));


if (Configuration::get('PS_ALLOW_HTML_IFRAME'))
{
$config->set('HTML.SafeIframe', true);
$config->set('HTML.SafeObject', true);
$config->set('URI.SafeIframeRegexp','/.*/');
}


// http://developers.whatwg.org/the-video-element.html#the-video-element
if ($def = $config->maybeGetRawHTMLDefinition())
{
   $def->addElement('video', 'Block', 'Optional: (source, Flow) | (Flow, source) | Flow', 'Common', array(
'src' => 'URI',
'type' => 'Text',
'width' => 'Length',
'height' => 'Length',
'poster' => 'URI',
'preload' => 'Enum#auto,metadata,none',
'controls' => 'Bool',
));
   $def->addElement('source', 'Block', 'Flow', 'Common', array(
'src' => 'URI',
'type' => 'Text',
));
}

$purifier = new HTMLPurifier($config);
}

I'll be very glad if you could provide some value informations. How can I debug it? 

 

Disabling overrides & non PrestaShop modules doesn't change it.

 

Thank you in advance.

 

Best wishes.

Edited by tcovoc (see edit history)
Link to comment
Share on other sites

Still the same problem. File has been regenerated.

 

As I've mentioned if I try to enable it and see this error and then return to Preferences -> General the HP is enabled.

 

The only modification connected with core files was Validate.php:

http://mypresta.eu/en/art/prestashop-16/extended-rich-text-editor.html

 

How can I check if HP is really working?

 

Best wishes

Edited by tcovoc (see edit history)
Link to comment
Share on other sites

  • 2 weeks later...
  • 1 month later...
  • 3 months later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...