1
Nick_James
NewBB fatal error

A registered user reported a problem with getting a 'white page' when going to our forum.

When I log in as the administrator, I do not get this problem. However, if I log in under his user account, I do.

I turned the troubleshooting on and found this error message.

Quote:
Fatal error: Call to undefined method XoopsModule::loadLanguage() in .../modules/newbb/include/functions.welcome.php on line 68


Any suggestions?
Nicholas James
President - LaDads
http://www.ladads.info

2
Nick_James
Re: NewBB fatal error

# XOOPS Version: XOOPS 2.3.2
# PHP Version: 5.2.5
# MySQL Version: 5.0.67.d7-ourdelta-log
# Server API Version: cgi-fcgi
# OS Version: Linux

NewBB 3.08


line 68 is:
if(!defined("_PROFILE_MA_ALLABOUT")) {
$mod->loadLanguage();
}
Nicholas James
President - LaDads
http://www.ladads.info

3
ghia
Re: NewBB fatal error
  • 2009/4/16 15:39

  • ghia

  • Community Support Member

  • Posts: 4953

  • Since: 2008/7/3 1


$module_handler =& xoops_gethandler('module');
    if(
$mod = @$module_handler->getByDirname('profile'true)):
    
$gperm_handler = & xoops_gethandler'groupperm' );
    
$groups = array(XOOPS_GROUP_ANONYMOUSXOOPS_GROUP_USERS);
    
    if(!
defined("_PROFILE_MA_ALLABOUT")) {
        
$mod->loadLanguage();
    }

It tries to load a language file from the profile module.
I assume you have this profile module installed. Does it have also the language files for the language you are using?
Is the profile module accessible to the user group of your user?

4
Nick_James
Re: NewBB fatal error

Yes, the 'registered user' group has module rights to the profile module.

The 'guest' account can access the forum. It is not getting the error.

I raised a test account up to 'webmaster status' and it still crashes.

So why would one 'webmaster' be able to access the forum and the other not?
Nicholas James
President - LaDads
http://www.ladads.info

5
Nick_James
Re: NewBB fatal error

Yes, I have the 'profile' module installed.

I am using only the English language.
Nicholas James
President - LaDads
http://www.ladads.info

6
ghia
Re: NewBB fatal error
  • 2009/4/16 19:59

  • ghia

  • Community Support Member

  • Posts: 4953

  • Since: 2008/7/3 1


Would you try once without the @ in
if($mod = @$module_handler->getByDirname('profile'true)):
So:
if($mod $module_handler->getByDirname('profile'true)):
Maybe there are some more errors in the debug mode then.
Quote:
So why would one 'webmaster' be able to access the forum and the other not?
Other users have seen this phenomena. My guess was that they belonged to multiple groups and mot all the same, but could never proof this hypothesis.

7
Nick_James
Re: NewBB fatal error

No luck with your suggestions.

Hmmm. I am stumped.
Nicholas James
President - LaDads
http://www.ladads.info

8
ghia
Re: NewBB fatal error
  • 2009/4/17 22:38

  • ghia

  • Community Support Member

  • Posts: 4953

  • Since: 2008/7/3 1


Upgrade to 2.3.3?

9
Nick_James
Re: NewBB fatal error

Perhaps so. Where do I also find if I have the latest version of newBB!

Can you explain to me what this code is trying to do? I don't know much code, but perhaps I can puzzle it out.
What does the mod > LoadLanguage() line do?
Nicholas James
President - LaDads
http://www.ladads.info

10
ghia
Re: NewBB fatal error
  • 2009/4/18 14:17

  • ghia

  • Community Support Member

  • Posts: 4953

  • Since: 2008/7/3 1


No, upgrading to 2.3.3 won't help you!
You have activated the welcome thread, which is very rare used.
The more I look at the code snippet, the more i get puzzled.
The loadlanguage appears to be a function of the XOOPS 2.2.x series.

So, the quickest solution would be to add the required definitions
define('_PROFILE_MA_ALLABOUT','All about %s');
define('_PROFILE_MA_AVATAR','Avatar');
define('_PROFILE_MA_EMAIL','Email');
to /modules/newbb/language/english/main.php

Login

Who's Online

224 user(s) are online (70 user(s) are browsing Support Forums)


Members: 0


Guests: 224


more...

Donat-O-Meter

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

Latest GitHub Commits