1
depricated
2.4.3 - 'XoopsFormHtmlarea' not found
  • 2010/1/20 12:16

  • depricated

  • Just popping in

  • Posts: 4

  • Since: 2010/1/20


I recently migrated my site to a new domain, and upgraded my XOOPS version while I did. Unfortunately, it seems now to have broken my forum module (newbbex). Any time a user attempts to post, it gives the following error:

Fatal error: Class 'XoopsFormHtmlarea' not found

I've turned the site on temporarily so you can see what's happening. Debugging is off, but this is where it's stopping.

http://pandersplayground.com/modules/newbbex/reply.php?forum=5&post_id=39&topic_id=14&viewmode=thread&order=

You can log in with:
username: xguest
password: xoopsxoops

to view the problem.

2
depricated
Re: 2.4.3 - 'XoopsFormHtmlarea' not found
  • 2010/1/20 14:21

  • depricated

  • Just popping in

  • Posts: 4

  • Since: 2010/1/20


Figured it out.

The first file we need to look at is

xoopsroot/modules/newbbex/include/forumform.inc.php
On line 94 you'll notice the beginning of this if statement:
if(newbbex_isX23()) {
    
$editor_configs=array();
    
$editor_configs['name'] = 'message';
    
$editor_configs['value'] = $message;
    
$editor_configs['rows'] = 35;
    
$editor_configs['cols'] = 60;
    
$editor_configs['width'] = '100%';
    
$editor_configs['height'] = '400px';
    
$editor = new XoopsFormEditor('''htmlarea'$editor_configs);
} else {
    
$editor = new XoopsFormHtmlarea('''message'$message);
}


This is what pointed me to the problem. Specifically, the conditional for the statement uses the function is23() from newbbex. So if we go to xoopsroot/modules/newbbex/ we see a file called functions.php (do not confuse this with the same functions.php in the include folder).

Open this up and you'll find the function isX23, which looks like this:
function newbbex_isX23()
{
    
$x23 false;
    
$xv str_replace('XOOPS ','',XOOPS_VERSION);
    if(
substr($xv,2,1) == '3') {
        
$x23 true;
    }
    return 
$x23;
}


Now, there are two ways to go about fixing this. The first requires the replacement of only one character. Change line 480 from
if(substr($xv,2,1) == '3') {
to
if(substr($xv,2,1) == '4') {

The other solution is easier to understand when you go back later to fix it, but takes a little more work. I really do mean little, though. Simply edit every instance of 3 to 4 in isX23. I even changed the name of the function to isX24 and called it that way.

Login

Who's Online

217 user(s) are online (143 user(s) are browsing Support Forums)


Members: 0


Guests: 217


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Apr 30
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits