Phoca Guestbook and HTMLPurifier Errors

I had installed Phoca Guestbook to my Joomla! 1.5 the last days…

So now i was going out to get it on my website so i check out the admistration section but if i goes to the site section i get only errors.

Errors:

Warning: require_once(HTMLPurifier/Error.php) [function.require-once]: failed to open stream: No such file or directory in /home/www/webx/html/components/com_phocaguestbook/assets/library/HTMLPurifier/ConfigSchema.php on line 3
Fatal error: require_once() [function.require]: Failed opening required 'HTMLPurifier/Error.php' (include_path='.') in /home/www/webx/html/components/com_phocaguestbook/assets/library/HTMLPurifier/ConfigSchema.php on line 3

The Solution: Upgrade my HTMLPurifier version so that i get away this damn includes.

Upgrade your HTMLPurifier in only 5 steps:

  1. Get on http://htmlpurifier.org/ and download the latest version (in my case it was v4.0.0)
  2. Replace your library with the one from the download package (/home/www/webx/html/components/com_phocaguestbook/assets/library)
  3. Open the file /home/www/webx/html/components/com_phocaguestbook/views/view.html.php with a editor
  4. Search for the following code:
    $configP = HTMLPurifier_Config::createDefault();
    $configP->set('Core', 'TidyFormat', !empty($_REQUEST['tidy']));
    $configP->set('Core', 'DefinitionCache', null);
    $configP->set('HTML', 'Allowed', 'strong,em,p[style],span[style],
    img[src|width|height|alt|title],
    li,ul,ol,a[href],u,strike');
    $purifier = new HTMLPurifier($configP);
    $post['content'] = $purifier->purify($post['content']);
    
  5. Replace with:

    $configP = HTMLPurifier_Config::createDefault();
    $configP->set('Core.Encoding', 'UTF-8');
    $configP->set('HTML.Doctype', 'XHTML 1.0 Transitional');
    $configP->set('HTML.TidyLevel', 'medium');
    $configP->set('HTML.Allowed','strong,em,p[style]
    ,span[style],
    img[src|width|height|alt|title],
    li,ul,ol,a[href],u,strike');
    $purifier = new HTMLPurifier($configP);
    $post['content'] = $purifier->purify($post['content']);
    

Finish! NOW you have a working Phoca Guestbook with HTMLPurifier v4.0.0 enjoy it![/fusion_builder_column][/fusion_builder_row][/fusion_builder_container]

By | 2016-10-29T13:55:20+00:00 February 19th, 2010|Uncategorized|4 Comments

4 Comments

  1. Midasnjh 07/07/2013 at 02:26

    Amazing such a valuable webpage.
    Regards – blog midsummer – K0nst4ntyn0

  2. Grattage 17/09/2011 at 19:34

    It doesn’t work for me ūüôĀ Any idea ?

    • Daniel 27/09/2011 at 14:32

      Hello

      with the current version you souldn’t need any manual fixes so please can you tell me the version you’ve tried?

  3. Alex 23/07/2011 at 19:19

    Have nice day! Much useful information, nice design, but this color hurts your eyes. ?

Comments are closed.