tarmouti Posted June 4, 2015 Share Posted June 4, 2015 (edited) 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 June 4, 2015 by tcovoc (see edit history) Link to comment Share on other sites More sharing options...
El Patron Posted June 4, 2015 Share Posted June 4, 2015 please check that you have this file: tools/htmlpurifier/HTMLPurifier.standalone.php this is where the class (not found above should be) Link to comment Share on other sites More sharing options...
tarmouti Posted June 4, 2015 Author Share Posted June 4, 2015 Dear El Patron. File is available. Line 1732 - class HTMLPurifier_Config http://pastebin.com/wYBCsJpR Link to comment Share on other sites More sharing options...
El Patron Posted June 4, 2015 Share Posted June 4, 2015 well that's weird, lets try this delete this file cache/class_index.php (first note the date last updated) Link to comment Share on other sites More sharing options...
tarmouti Posted June 4, 2015 Author Share Posted June 4, 2015 (edited) 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 June 4, 2015 by tcovoc (see edit history) Link to comment Share on other sites More sharing options...
tarmouti Posted June 18, 2015 Author Share Posted June 18, 2015 (edited) Refresh Edited June 18, 2015 by tcovoc (see edit history) Link to comment Share on other sites More sharing options...
ItalianBoutiqueShoes Posted August 6, 2015 Share Posted August 6, 2015 Same problem. Do you find a solution? Link to comment Share on other sites More sharing options...
tarmouti Posted August 6, 2015 Author Share Posted August 6, 2015 It was connected with php version (5.2). Using 5.3+ is recommended. Link to comment Share on other sites More sharing options...
Enrique Gómez Posted November 30, 2015 Share Posted November 30, 2015 Maybe it will help someone In my case (Multishop PS 1.6.0.14) I disabled it in one shop and get the error. Go to ps_configuration and put 0 value (disabled) to the "shop" context. 1 Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now