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]