Error: Call to undefined Method

Phoca Guestbook - creating guestbooks in Joomla! CMS
DerRuhri
Phoca Newbie
Phoca Newbie
Posts: 3
Joined: 10 Mar 2008, 23:33
Location: Germany

Error: Call to undefined Method

Post by DerRuhri »

Hello,

when I installed the Phoca Guestbook on a local test installation,
Installation and Creation of Guestbook worked fine.
Also no error when trying to create a link in the main menu
(to the one and only guestbook)
But when I try to click on the menu item,
the following warning and error show instead of the guestbook:

Warning: domdocument::domdocument() expects at least 1 parameter, 0 given in
[site root]\components\com_phocaguestbook\assets\library\HTMLPurifier\Lexer\DOMLex.php on line 58

Fatal error: Call to undefined method domdocument::loadHTML() in
[site root]\components\com_phocaguestbook\assets\library\HTMLPurifier\Lexer\DOMLex.php on line 62

Short overview of the system:
Phoca Guestbook: 1.3.0 beta
Joomla: 1.5.4 German
XAMPP 1.6.7 for Windows
- Apache HTTPD 2.2.9
- MySQL 5.0.51b
- PHP 5.2.6
Windows2000 Professional (5.0 Build 2195 Platform 2 Service Pack 4)
for a detailed overview I attach a JTS log

Any help is appreciated
Thanks in advance for your help!

Dirk

Diagnostic Information
Joomla! Version: Joomla! 1.5.4 Production/Stable [ Naiki ] 6-July-2008 22:00 GMT
configuration.php: Writable (Mode: 666 ) | RG_EMULATION: N/A
Architecture/Platform: Windows NT 5.0 ( i586) | Web Server: Apache/2.2.9 (Win32) DAV/2 mod_ssl/2.2.9 OpenSSL/0.9.8h mod_autoindex_color PHP/5.2.6 ( localhost ) | PHP Version: 5.2.6
PHP Requirements: register_globals: Disabled | magic_quotes_gpc: Enabled | safe_mode: Disabled | MySQL Support: Yes | XML Support: Yes | zlib Support: Yes
mbstring Support (1.5): Yes | iconv Support (1.5): Yes | save.session_path: Writable | Max.Execution Time: 60 seconds | File Uploads: Enabled
MySQL Version: 5.0.51b-community-nt ( [...] via TCP/IP )

Extended Information:
SEF: Disabled (without ReWrite) | FTP Layer: Enabled | htaccess: Not Implemented
PHP/suExec: User and Web Server accounts are not the same. (PHP/suExec probably not installed)
PHP Environment: API: apache2handler | MySQLi: Yes | Max. Memory: 32M | Max. Upload Size: 32M | Max. Post Size: 16M | Max. Input Time: 60 | Zend Version: 2.2.0
Disabled Functions:
MySQL Client: 5.0.51b ( latin1 )
Last edited by DerRuhri on 12 Jul 2008, 12:14, edited 1 time in total.
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 48704
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Error: Call to undefined Method

Post by Jan »

Hi the problem is that Phoca Gallery uses external method to clean the xhtml code from some attacks (e.g. xss attack) because of not correctly working clean method in Joomla... So I don't know what can be the problem on here ... :( maybe some files are missed in the installation (do you have the last version of Phoca Guestbook?) :(

Jan
If you find Phoca extensions useful, please support the project
DerRuhri
Phoca Newbie
Phoca Newbie
Posts: 3
Joined: 10 Mar 2008, 23:33
Location: Germany

[Updated]: Error - only in latest Joomla 1.5.4?

Post by DerRuhri »

Thx for the fast response!

Yes, phoca guestbook is 1.3 .0beta and Joomla is 1.5.4
The funny thing is that an old phoca version (I think 1.2.2)
works without problems on Joomla 1.5.1 on the live website..

So old on old works, latest on latest on test installation does not.

If I find the time over the weekend, I will check wether an
'older' phoca version works on Joomla 1.5.4 and let you know.

[Added Sat , July 12]
  • Live Website: Joomla 1.5.1 - Guestbook 1.2.2 - works fine
    Test Site: Joomla 1.5.4 - Guestbook 1.3.0 - errror
    Test Site: Joomla 1.5.4 - Guestbook 1.2.2 - errror
    Unfortunately, unlike your site, afaik Joomla doesn't keep
    record of their older versions so I can't run out of the box
    Joomla 1.5.1 - Guestbook 1.3.0, which should be interesting.
Given my very limited knowledge in php, please excuse my wild guessing:
As the function 'tokenizeHTML' which calls domdocument::loadHTML() and then
throws the error has not been changed between guestbook 1.2.2 and 1.3.0,

Code: Select all

        $doc = new DOMDocument();
        $doc->encoding = 'UTF-8'; // theoretically, the above has this covered
        
        set_error_handler(array($this, 'muteErrorHandler'));
        $doc->loadHTML($html);
  • - either domdocument::loadHTML() has been changed between 1.5.1 and 1.5.4
    which I doubt pretty much - too basic
    - or I'm not seeing something really stupid in my test scenario :oops:
I really like your components and the swift support (had three smaller issues before
which I could solve by simply reading other posts), but here I'm at the end of my wits.
Staying on Joomla1.5.1 and phoca1.2.2 solves it for now, but is not an option for good.
Again, any ideas welcome :wink:

Dirk
DerRuhri
Phoca Newbie
Phoca Newbie
Posts: 3
Joined: 10 Mar 2008, 23:33
Location: Germany

Re: Error: Call to undefined Method

Post by DerRuhri »

Hmm ..even if I put in in a fresh 1.5.4, nothing else but the Guest Book installed,
I get this error - no matter wether I install the sample data or not.

jos_phocaguestbook_books and jos_phocaguestbook_items were created ok

In the back end everything looks ok, in the front end it doesn't.

Even after I imported the items and guestbooks from an existing installation via
SQL script - in the backend o.k., but I can't link it in the front end.

Always these two errors
Warning: domdocument::domdocument() expects at least 1 parameter, 0 given in
..\components\com_phocaguestbook\assets\library\HTMLPurifier\Lexer\DOMLex.php on line 58

Fatal error: Call to undefined method domdocument::loadHTML() in
..\components\com_phocaguestbook\assets\library\HTMLPurifier\Lexer\DOMLex.php on line 62
Weird.
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 48704
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Error: Call to undefined Method

Post by Jan »

The funny thing is that an old phoca version (I think 1.2.2)
works without problems on Joomla 1.5.1 on the live website..

So old on old works, latest on latest on test installation does not.
Not funny :( , it works but without protection... the problem code is a HTML purifier code using in Phoca Guestbook, but version 1.2.2 doesn't use this method. It works (v1.2.2) but there is no protection e.g. against XSS attacks... :(

Jan
If you find Phoca extensions useful, please support the project
vfx
Phoca Member
Phoca Member
Posts: 21
Joined: 16 Oct 2008, 00:28

Re: Error: Call to undefined Method

Post by vfx »

i got the same error with latest version of Guestbook 1.3.2
vfx
Phoca Member
Phoca Member
Posts: 21
Joined: 16 Oct 2008, 00:28

Re: Error: Call to undefined Method

Post by vfx »

i found a fix via this linkhttp://forums.bambooinvoice.org/index.p ... hread/317/

If you're using xampp, go to apache/bin/php.ini and comment out:

extension=php_domxml.dll and extension=php_pdf.dll
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 48704
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Error: Call to undefined Method

Post by Jan »

Ok
If you find Phoca extensions useful, please support the project
Post Reply